A Handle Points to a Pointer to a Macintosh Heap Block (37311)
The information in this article applies to:
- Microsoft QuickBASIC Compiler for the Apple Macintosh
This article was previously published under Q37311 SUMMARY
Many of the Microsoft QuickBASIC Toolbox Library (MBLC) routines make
use of handles for manipulating resources.
A handle is a pointer to a block of memory in the Macintosh heap. This
pointing structure is used to allow dynamic memory allocation and
management by the system to occur without creating havoc.
MORE INFORMATION
The Macintosh heap space is managed by the System dynamically. Parts
of the heap can move around. The System can compress the information
in the heap to one location, allowing a large continuous block of heap
space for other applications.
A handle will actually point to a master pointer, which in turn points
to a particular block in the heap. When the system performs its memory
allocations and management, it only knows the location of the master
pointer. It does NOT know the handle's location. Thus, when the memory
block is moved, the master pointer is updated, which in effect updates
the handle.
Modification Type: | Minor | Last Reviewed: | 1/8/2003 |
---|
Keywords: | KB37311 |
---|
|