Late Initialization

This Atom is Under Construction

Sometimes you want to initialize properties of your class after it was created: not in the constructor or using lazy, but in another designated member function.

That may happen if you’re working with a framework or library which requires you to put initialization logic into a special function (often by extending a library class and providing your own implementation of this function). We’ll use a toy example (without addressing any specific library) just to illustrate the general concept.

End of sample. See for full early-access book.

Previous          Next

©2018 Mindview LLC. All Rights Reserved.