util.weaksingleton

Singleton with no global access.

template WeakSingleton()

Singleton template mixin with support for polymorphism, without global access.

Note:
Any non-abstract weak singleton class must call singletonCtor() in its ctor and singletonDtor in its dtor or die() method.

typeof(this) _instance_;

Singleton object itself.

void singletonCtor();

Enforce only single instance at any given time.

void singletonDtor();

Enforce only single instance at any given time.