I have a strange habit it seems... according to my co-worker at least. We\'ve been working on a small project together. The way I wrote the classes is (simplified example):<
Do you consider implementing such pattern using Lazy
?
In addition to easy creation of lazy-loaded objects, you get thread safety while the object is initialized:
As others said, you lazily-load objects if they're really resource-heavy or it takes some time to load them during object construction-time.