The lifetime of a variable, array, or object is the duration from its allocation to its deallocation.

Related concepts:  AllocationGarbage CollectionVariableObjectArrayScope

Closest Wikipedia entry:  Object lifetime — In object-oriented programming (OOP), the object lifetime (or life cycle) of an object is the time between an object's creation and its destruction. Rules for object lifetime vary significantly between languages, in some cases between implementations of a given language, and lifetime of a particular object may vary from one run of the program to another. In some cases, object lifetime coincides with variable lifetime of a variable with that object as value (both for static variables and automatic variables), but in general, object lifetime is not tied to the lifetime of any one variable.

Misconceptions about Lifetime
2 documented Misconceptions

Check Yourself

Stay up-to-date

Follow us on  twitter to hear about new misconceptions.