Dodatkowe przykłady dopasowywane są do haseł w zautomatyzowany sposób - nie gwarantujemy ich poprawności.
Note that lazy initialization can also be used in non-object-oriented languages.
Lazy initialization of heap initializes only when required, to improve performance.
Lazy initialization avoids initializing a value until the first time it is accessed.
In a software design pattern view, lazy initialization is often used together with a factory method pattern.
The following is an example of a class with Lazy initialization implemented in Actionscript:
Here is an example of lazy initialization in PHP 5:
Here is an example in Smalltalk, of a typical accessor method to return the value of a variable using lazy initialization.
The drawback is that the enum type is somewhat inflexible; for example, it does not allow lazy initialization.
An attribute's characteristics may include a read/write flag, a type, accessor method names, delegations, a default value and lazy initialization.
The Java (programming language) solutions provided here are all thread-safe but differ in supported language versions and lazy initialization.
It is typically used to reduce locking overhead when implementing "lazy initialization" in a multi-threaded environment, especially as part of the Singleton pattern.
There are four common ways of implementing the lazy load design pattern: lazy initialization; a virtual proxy; a ghost, and a value holder.
In computer programming, lazy initialization 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.
In software engineering, the Initialization on Demand Holder idiom (design pattern) aka Lazy Initialization Holder Class idiom is a lazy-loaded singleton.