Scala, Scala Programming, Programming, Design Patterns, Singleton Design Pattern.
this.ec2MemOptIns.get.destroy this.ec2MemOptIns = None } } def EC2ComOpt: EC2Con = { new EC2ComOptDelegator() } private[complex] def getEC2ComOptIns: EC2Con = { if (this.ec2ComOptIns.isEmpty) { this.ec2ComOptIns = Option(new EC2ComOpt) this.ec2ComOptIns.get.create } this.ec2ComOptIns.get } def