[basic.stc.general]

# 6 Basics [[basic]](./#basic)

## 6.8 Memory and objects [[basic.memobj]](basic.memobj#basic.stc.general)

### 6.8.6 Storage duration [[basic.stc]](basic.stc#general)

#### 6.8.6.1 General [basic.stc.general]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/basic.tex#L4244)

The [*storage duration*](#def:storage_duration "6.8.6.1 General [basic.stc.general]") is the property of an object that defines the minimum
potential lifetime of the storage containing the object[.](#1.sentence-1)

The storage
duration is determined by the construct used to create the object and is
one of the following:

- [(1.1)](#1.1)

static storage duration

- [(1.2)](#1.2)

thread storage duration

- [(1.3)](#1.3)

automatic storage duration

- [(1.4)](#1.4)

dynamic storage duration

[*Note [1](#note-1)*:

After the duration of a region of storage has ended,
the use of pointers to that region of storage is limited ([[basic.compound]](basic.compound "6.9.4 Compound types"))[.](#1.sentence-2)

â *end note*]

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/basic.tex#L4261)

Static, thread, and automatic storage durations are associated with objects
introduced by declarations ([[basic.def]](basic.def "6.2 Declarations and definitions")) and
with temporary objects ([[class.temporary]](class.temporary "6.8.7 Temporary objects"))[.](#2.sentence-1)

The dynamic storage duration
is associated with objects created by a[*new-expression*](expr.new#nt:new-expression "7.6.2.8 New [expr.new]") ([[expr.new]](expr.new "7.6.2.8 New")) or
with implicitly created objects ([[intro.object]](intro.object "6.8.2 Object model"))[.](#2.sentence-2)

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/basic.tex#L4274)

The storage duration categories apply to references as well[.](#3.sentence-1)

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/basic.tex#L4277)

The storage duration of subobjects and reference members
is that of their complete object ([[intro.object]](intro.object "6.8.2 Object model"))[.](#4.sentence-1)
