Function

NSReallocateCollectable

Reallocates collectable memory.

Declaration

void * NSReallocateCollectable(void *ptr, NSUInteger size, NSUInteger options);

Discussion

Changes the size of the block of memory pointed to by ptr to size bytes. It may allocate new memory to replace the old, in which case it moves the contents of the old memory block to the new block, up to a maximum of size bytes.

options can be 0 or NSScannedOption: A value of 0 allocates non-scanned memory; a value of NSScannedOption allocates scanned memory.

This function returns NULL if it’s unable to allocate the requested memory.

See Also

Legacy

NSGarbageCollector

A convenient interface to the garbage collection system.

Deprecated
NSAllocateCollectable

Allocates collectable memory.

NSMakeCollectable

Makes a newly allocated Core Foundation object eligible for collection.

Memory Allocation Options

Constants used to control behavior when allocating or reallocating collectible memory.