unregisterSingleton()

unregisterSingleton(class : 4D.Class)

Because singletons are only instantiated once, during development if you change a singleton class, the singleton instance must be recreated.

  • If the class constructor takes no parameters (and you do not call registerSingleton for that class), you must call this method so that the next call to instance() will create and register a new instance.

  • If you call registerSingleton() manually for the class (rather than implicitly through instance()), after calling this method you must call registerSingleton() again to register a new instance.

Last Updated:
Contributors: Aparajita