You can write some complicated code to ensure that you don't create any object until you absolutely need it. Or you can use the Lazy object...at least some of the time. Sometimes your application ...
Lazy loading is a common design pattern often used for constructing resource-intensive objects. It's also frequently used in conjunction with the singleton, and/or factory patterns. Lazy loading ...