GlobalDiscard macro

Discards the specified global memory block. The lock count of the memory object must be zero.

Note  The global functions have greater overhead and provide fewer features than other memory management functions. New applications should use the heap functions unless documentation states that a global function should be used. For more information, see Global and Local Functions.
 

Syntax

void GlobalDiscard(
   h
);

Parameters

h

A handle to the global memory object. This handle is returned by either the GlobalAlloc or GlobalReAlloc function.

Return Value

None

Remarks

Although GlobalDiscard discards the object's memory block, the handle to the object remains valid. The process can subsequently pass the handle to the GlobalReAlloc function to allocate another global memory block identified by the same handle.

Requirements

   
Windows version Windows XP [desktop apps only] Windows Server 2003 [desktop apps only]
Target Platform Windows
Header winbase.h (include Windows.h)

See Also

Global and Local Functions

GlobalAlloc

GlobalReAlloc

Memory Management Functions