Singleton pattern implementation (code, documentation & example).