| HeapDeref | Function (ROM Call 0x96)

alloc.h

void *HeapDeref (HANDLE Handle);

Dereferences a handle.

HeapDeref dereferences Handle and returns a pointer to the actual block of the memory defined by that Handle. Nearly all heap allocation routines return a "handle" which is an identifier for a block of memory allocated in the heap. In order to use that memory, the handle must be dereferenced. Once a handle is dereferenced, that pointer is valid as long as nothing else is done to cause the heap to be compressed. If the heap is compressed the handle can be re-dereferenced to make it valid again. If a handle is locked, then the pointer that references that block of memory is valid even after the heap is compressed (since locking a handle means the heap manager will never move the memory associated with that handle).
Note: HeapDeref returns garbage if Handle is H_NULL.

Used by: cmd_cubicreg, cmd_expreg, cmd_linreg, cmd_lnreg, cmd_logistic, cmd_medmed, cmd_onevar, cmd_powerreg, cmd_quadreg, cmd_quartreg, cmd_twovar, LoadDLL, EV_defaultHandler, MO_modeDialog, GR3_paint3d, GR3_xyToWindow, GrayOn, HomeStorePair, FKeyI_H, de_loop, EV_quit, execute_graph_func, GR3_addContours, InitDEMem, InitTimeSeq, Regraph, run_one_seq, FindProgramVar, ROM Call 0x424