Pointer Safety and Garbage Collection
Utilities » Memory
Collaboration diagram for Pointer Safety and Garbage Collection:

## Enumerations

enum class | std::pointer_safety { relaxed , preferred , strict }

## Functions

void | std::declare_no_pointers (char *, size_t)
void | std::declare_reachable (void *)
pointer_safety | std::get_pointer_safety () noexcept
void | std::undeclare_no_pointers (char *, size_t)
template<typename _Tp>
_Tp * | std::undeclare_reachable (_Tp *__p)

## Detailed Description

Utilities to assist with garbage collection in an implementation that supports strict pointer safety. This implementation only supports relaxed pointer safety and so these functions have no effect.

C++11 20.6.4 [util.dynamic.safety], Pointer safety

## Enumeration Type Documentation

## pointer_safety

enum class std::pointer_safety

strong

Constants representing the different types of pointer safety.

Definition at line 119 of file memory.

## Function Documentation

## declare_no_pointers()

void std::declare_no_pointers | ( | char * | ,
|  | size_t | )

inline

Inform a garbage collector that a region of memory need not be traced.

Definition at line 132 of file memory.

## declare_reachable()

void std::declare_reachable | ( | void * |  | ) |

inline

Inform a garbage collector that an object is still in use.

Definition at line 123 of file memory.

## get_pointer_safety()

pointer_safety std::get_pointer_safety | ( |  | ) |

inline noexcept

The type of pointer safety supported by the implementation.

Definition at line 140 of file memory.

## undeclare_no_pointers()

void std::undeclare_no_pointers | ( | char * | ,
|  | size_t | )

inline

Unregister a range previously registered with declare_no_pointers.

Definition at line 136 of file memory.

## undeclare_reachable()

template<typename _Tp>

_Tp * std::undeclare_reachable | ( | _Tp * | __p | ) |

inline

Unregister an object previously registered with declare_reachable.

Definition at line 128 of file memory.