Grokking Design Patterns for Engineers and Managers
Ask Author
Back to course home

0% completed

Vote For New Content
Lazy loading for Singleton instances

prabrisha

Aug 17, 2025

You have only provided examples on eager loading of singleton instances. please provide some examples and explanations/discussion on lazy loading too. Also, you have provided a private constructor. But, in the pros section, you have mentioned the subclass/extendable feature. Please provide relevant example too.

0

0

Comments
Comments

On this page

Real-World Example

Structure of Singleton Pattern

Implementation of Singleton Pattern

Pseudocode

Applications of Singleton Pattern

Pros and Cons

Summary