I'm not sure I understood you correctly, you mean using this I can create another class that will extend the SingletonClass? Then SingletonClass isn't a singleton, because, by definition, it cannot be extended.
Plus, I have tried something like this and failed, can you provide the code?
I'm not sure I understood you correctly, you mean using this I can create another class that will extend the
SingletonClass
? ThenSingletonClass
isn't a singleton, because, by definition, it cannot be extended.Plus, I have tried something like this and failed, can you provide the code?
I forgot about constructors prototype chain :P
Here you have working example:
This is not a singleton class now :) But nevertheless, excellent example.