# fn() arrayClearSpace
Destroys the begin of an array and keeps the rest.

Defined in | <seqan/basic.h>
Signature | `void arrayClearSpace(arrBegin, arrLength, keepFrom, moveTo);`

## Parameters

`arrBegin` | Pointer to the first element of the array.
`keepFrom` | Offset of the first object that will be kept.
`arrLength` | Length of the array.
`moveTo` | Offset the first kept object will get at the end of the function.

## Detailed Description

The objects `arr[keep_from]` to `arr[arr_length-1]` are moved to the area beginning at positions `move_to`. All objects in `arr[0]` to `arr[keep_from-1]` are destroyed. After this function, the first `move_to` positions of the array are free and dont contain objects.

The array must have at least enough space to store `arr_length + move_to - keep_from` objects.

The objects from `arr[0]` to `arr[array_length-1]` have to be initialized/constructed, arrays beyond `arr[array_length-1]` are assumed not to be constructed. If this assumption is violated, memory might leak.

## Data Races

Thread safety unknown!

#### Dox Sources

    /*!
     * @fn arrayClearSpace
     *
     * @headerfile <seqan/basic.h>
     *
     * @brief Destroys the begin of an array and keeps the rest.
     *
     * @signature void arrayClearSpace(arrBegin, arrLength, keepFrom, moveTo);
     *
     * @param[in] arrBegin Pointer to the first element of the array.
     * @param[in] keepFrom Offset of the first object that will be kept.
     * @param[in] arrLength Length of the array.
     * @param[in] moveTo Offset the first kept object will get at the end of the
     *                   function.
     *
     * The objects <tt>arr[keep_from]</tt> to <tt>arr[arr_length-1]</tt> are moved
     * to the area beginning at positions <tt>move_to</tt>. All objects in
     * <tt>arr[0]</tt> to <tt>arr[keep_from-1]</tt> are destroyed. After this
     * function, the first <tt>move_to</tt> positions of the array are free and dont
     * contain objects.
     *
     * The array must have at least enough space to store <tt>arr_length + move_to -
     * keep_from</tt> objects.
     *
     * The objects from <tt>arr[0]</tt> to <tt>arr[array_length-1]</tt> have to be
     * initialized/constructed, arrays beyond <tt>arr[array_length-1]</tt> are
     * assumed not to be constructed. If this assumption is violated, memory might
     * leak.
     */