## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# csSafeCopyArrayMemoryAllocator< T, ElementHandler > Class Template Reference
[Containers]

Special allocator for csArray that makes sure that when the array is reallocated that the objects are properly constructed and destructed at their new position. More...

`#include <csutil/array.h>`

List of all members.

## Static Public Member Functions

static T * | Alloc (size_t count)
static void | Free (T *mem)
static void | MemMove (T *mem, size_t dest, size_t src, size_t count)
static T * | Realloc (T *mem, size_t relevantcount, size_t oldcount, size_t newcount)

## Detailed Description

### template<class T, class ElementHandler = csArrayElementHandler<T>>
class csSafeCopyArrayMemoryAllocator< T, ElementHandler >

Special allocator for csArray that makes sure that when the array is reallocated that the objects are properly constructed and destructed at their new position.

This is needed for objects that can not be safely moved around in memory (like weak references). This is of course slower and that is the reason that this is not done by default.

Definition at line 223 of file array.h.

The documentation for this class was generated from the following file:

- csutil/array.h