Citrus-Engine icon indicating copy to clipboard operation
Citrus-Engine copied to clipboard

Unsafe Singletons

Open needsnaming opened this issue 11 years ago • 0 comments

The singleton pattern used for the level manager class is not a true singleton. There are better AS3 singleton patterns that give you safety and true singleton behavior.

Every time new LevelManager() is called, the existing instance will be overwritten. Please update to a more accurate representation of the design pattern.

Thanks.

some examples: http://stackoverflow.com/questions/13318290/as3-singleton-implementations http://blog.pixelbreaker.com/actionscript-3-0/as30-better-singletons

needsnaming avatar Jul 27 '14 04:07 needsnaming