Encyclopedia > Lazy initialization

  Article Content

Lazy initialization

Lazy initialization in computer programming is the tactic of delaying the creation of an object, the calculation of a value or some other expensive process until the first time it is needed.

This is typically accomplished by maintaining a flag indicating whether the process has taken place. Each time the desired thing is summoned, the flag is tested. If it's ready, it is returned. If not, it is initialized on the spot.



All Wikipedia text is available under the terms of the GNU Free Documentation License

 
  Search Encyclopedia

Search over one million articles, find something about almost anything!
 
 
  
  Featured Article
Great River, New York

... 25 to 44, 24.2% from 45 to 64, and 12.7% who are 65 years of age or older. The median age is 39 years. For every 100 females there are 104.2 males. For every 100 females ...

 
 
 
This page was created in 28.2 ms