34. Memory and Resources

Anyone can have an idea; it’s what you do with the idea that’s the important thing.

– Terry Pratchett

Introduction

“Almost Containers”

array; bitset; vector<bool>; Tuples

Resource Management Pointers

unique_ptr; shared_ptr; weak_ptr

Allocators

The Default Allocator; Allocator Traits; Pointer Traits; Scoped Allocators

The Garbage Collection Interface

Uninitialized Memory

Temporary Buffers; raw_storage_iterator

Advice

34.1. Introduction

The STL (Chapter 31, Chapter 32, Chapter 33) is the most highly structured and general part of the standard-library facilities for the management and manipulation of data. This chapter presents facilities that are more specialized or deal with raw memory (as opposed to typed ...

Get The C++ Programming Language, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.