Storage duration defines when and for how long an object will exist in the program life cycle. It is the property for an object that limits the object lifetime.
There are four types of storage duration:
- auto
- static
- thread
- allocated
Storage duration defines when and for how long an object will exist in the program life cycle. It is the property for an object that limits the object lifetime.
There are four types of storage duration: