Actually the comment above 'class SingletonEnforcer' explains it.
package{
public class Singleton{
private static var _instance:Singleton=null;
public function Singleton(e:SingletonEnforcer){
trace("new instance of singleton created");
}
public static function getInstance():Singleton{
if(_instance==null){
_instance=new Singleton(new SingletonEnforcer());
}
return _instance;
}
}
}
//I’m outside the package so I can only be accessed internally
class SingletonEnforcer{
//nothing else required here
}
--
View this message in context:
http://apache-flex-development.2333347.n4.nabble.com/FlexJS-FalconJX-Internal-Classes-tp50091p50102.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.