Jul 27 2008
Singleton Classes in Actionscript 3.0
Singleton Classes are based on the Singleton Design Pattern and have a single instance of the class throughout the application. When would one need a singleton class ? A simple example would be a database manager class which would instantiate a connection to the database at the application initialization and have methods for data manipulation of the database tables. In such a case multiple instances of this class is not required and will end up consuming memory and other issues.
How does one implement a Singleton Class ?

Subscribe by Email



