posted 20 years ago
Lazy instantiation/initialisation means you don't initialise a member until the first time that member is requested somewhere.
Typically you'd have something like
Typically it's used when the initialisation of the data is expensive and won't be required for every instance of the class. Using lazy instantiation in such cases yields a performance win for many users of the class either by using less CPU cycles and/or less memory.