reallocate
- void reallocate(A allocator, T[] array, size_t newCount, bool initialize, bool gcScan)
void
reallocate
(,,,,in bool gcScan = hasIndirections!T ) - bool tryReallocate(A allocator, T[] array, size_t newCount, bool initialize, bool gcScan)
unstd memory allocation
enumsfunctionspropertiesstatic variablesstructs
Requests resize of a properly aligned block of memory allocated from allocator or if ptr is null requests memory allocation like allocate/tryAllocate. Memory may be moved, but array elements content will stay the same.
If initialize is true and array.length < newCount the memory of "rest" elements will be set to T.init.
If reallocation fails array isn't changed. tryReallocate returns whether reallocation succeeded.
If reallocation fails reallocate will also call $(COREREF exception, onOutOfMemoryError) which is expected to throw an $(COREREF exception, OutOfMemoryError).
Preconditions: newCount