Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Memory /
Chapter 2 - Memory Manager / Memory Manager Reference
Memory Manager Routines / Allocating and Releasing Relocatable Blocks of Memory


NewHandleClear

You can use the NewHandleClear function to allocate prezeroed memory in a relocatable block of a specified size.

FUNCTION NewHandleClear (logicalSize: Size): Handle;
logicalSize
The requested size (in bytes) of the relocatable block. The NewHandleClear function sets each of these bytes to 0.
DESCRIPTION
The NewHandleClear function works much as the NewHandle function does 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 clear the block manually a long word at a time.

RESULT CODES
noErr0No error
memFullErr-108Not enough memory in heap zone

Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996