# Class VolatilePtr
Helper data structure for handling volatile data.

Defined in | <seqan/basic.h>
Signature | `template <typename T> class VolatilePtr;`

## Template Parameters

`T` | The pointed-to type.

## Interface Function Overview

- `void nukeCopies(ptr);`
  Reset all pointers connected to a given one.

## Detailed Description

Allows you to handle volatile data (used by ext. string during swapping).

Imagine volatile pointers as nodes in an undirected graph. When you assign one to another then they are connected. All pointers in a connection component points to the same value. By calling nukeCopies you can destroy the component and set all pointers to `NULL`.

## Interface Functions Detail

### `void nukeCopies(ptr);`

Reset all pointers connected to a given one.

#### Parameters

`ptr` | One pointer of the connected component to reset.

#### Data Races

Thread safety unknown!

#### Dox Sources

    /*!
     * @class VolatilePtr
     *
     * @headerfile <seqan/basic.h>
     *
     * @brief Helper data structure for handling volatile data.
     *
     * @signature template <typename T> class VolatilePtr;
     *
     * @tparam T The pointed-to type.
     *
     * Allows you to handle volatile data (used by ext. string during swapping).
     *
     * Imagine volatile pointers as nodes in an undirected graph. When you assign
     * one to another then they are connected. All pointers in a connection
     * component points to the same value. By calling nukeCopies you can destroy the
     * component and set all pointers to <tt>NULL</tt>.
     *
     * @fn VolatilePtr#nukeCopies
     *
     * @brief Reset all pointers connected to a given one.
     *
     * @signature void nukeCopies(ptr);
     *
     * @param[in] ptr One pointer of the connected component to reset.
     */