Singleton

creates a single instance of an object or module that can be accessed in any module

new ocs.Singleton(name);


Parameter Type Description
name String / Number the unique name of the Singleton

Methods

Properties


Methods

duplicate

duplicate the Singleton

ocs.Singleton.duplicate(name);


Parameter Type Description
name String / Nunber the name of the new Singleton

destroy

destroy this Singleton

ocs.Singleton.destroy();


Properties

name

String

reference to the name of the Singleton

ocs.Singleton.name

instance

Object

reference to the name of the instance

ocs.Singleton.instance