Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: temp commit

Wiki Markup
Sometimes it is required to limit the numberInstead of instances ofinitializing a member object to just one (this is similar to a singleton, however, the member object may or may not be {{static}}). Instead of initializing using a constructor, sometimes a technique called lazy initialization can beis used to defer the construction of the member object until an instance is actually required. Lazy initialization also helps in breaking harmful circularities in class and instance initialization, and performing other optimizations \[[Bloch 05|AA. Java References#Bloch 05]\].

...