Skip to main content

2 docs tagged with "lifetime"

View all tags

Object Lifetime

Object lifetime spans from construction to destruction. Understanding lifetime is critical for memory safety, RAII, and avoiding undefined behavior.

Storage Duration

Storage duration defines when and where objects are created and destroyed. C++ has four storage durations: automatic, static, dynamic, and thread.