Singleton pattern
From wikinotes
The singleton makes a class behave like a global variable. Once it is instantiated once, re-instantiating it will always return the same instance.
This is very useful, but should be used sparingly.
The singleton makes a class behave like a global variable. Once it is instantiated once, re-instantiating it will always return the same instance.
This is very useful, but should be used sparingly.