November 2019
Beginner to intermediate
674 pages
15h
English
If you intend to use a large number of lazily created objects, you will soon get fed up of writing all of the management code. A simpler solution is to use a pre-made lazy initialization wrapper, such as Lazy<T> from the Spring4D library (https://bitbucket.org/sglienke/spring4d).
I have prepared an example, LazyInitializationSpring4D that uses Lazy<T> to do the hard work. It requires the Spring4D library to function. To run the example program, you'll have to install this library and then add its Source and Source\Base folders to Delphi's Library path or to the project's Search path. If you unpack the library into the Chapter10\Spring4D folder, the project's search path will already be correctly configured.
Read now
Unlock full access