Generic Singleton with support for WeakReferences