![]() |
NewHandleClear |
||||
Header: | MacMemory.h | Carbon status: | Supported | |
Allocates a relocatable block of memory of a specified size with all its bytes set to 0.
Handle NewHandleClear ( Size byteCount );
The requested size (in bytes) of the relocatable block. The NewHandleClear function sets each of these bytes to 0.
A handle to the new block. If NewHandleClear cannot allocate a block of the requested size, it returns NULL.
The NewHandleClear function works like the NewHandle function, but sets all bytes in the new block to 0 instead of leaving the contents of the block undefined.
Currently, NewHandleClear clears the block one byte at a time. For a large block, it might be faster to write your own code to clear the block.
Call the function MemError to get the result code. See
Because NewHandleClear allocates memory, you should not call it at interrupt time.
Supported in Carbon. Available in CarbonLib 1.0 and later when InterfaceLib 7.1 or later is installed. Exported by CarbonLib 1.0 and later and by InterfaceLib 7.1 and later.