nw::ut::MoveArray::Reset Member Function

Syntax

void Reset(
     void * elements,
     size_t size,
     os::IAllocator * allocator = NULL,
     ArrayKind kind = ARRAY_WRAPPER
);

Arguments

Name Description
in elements Memory allocated for storing elements.
in size Number of elements.
in allocator Allocator.
in kind Type of memory expansion method.

Return Values

None.

Description

Resets the array to manage MoveArray.

The passed memory is released with a destructor. If kind is set to ARRAY_VARIABILITY, a function for automatically increasing the array size is enabled. Memory is secured internally when the array size is increased automatically. If internal allocation of memory is inappropriate, be sure to set kind to ARRAY_WRAPPER. Also, memory is not freed by the destructor if allocator is set to 0.

Before resetting, the managed memory calls the destructor, and if an allocator is passed during setting, the memory is released.


CONFIDENTIAL