Click or drag to resize

MemGrpClose Function

X#
Close a memory group.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax
 FUNCTION MemGrpClose(
	wGroup AS DWORD
) AS WORD
Request Example View Source

Parameters

wGroup
Type: DWord
The group you want to close.
If an invalid group is specified, a message box informs you of the failed attempt to close an invalid group.

Return Value

Type: Word
0 if successful; otherwise, 65,535.
Remarks
After a call to MemGrpClose(), any memory held by the group is subject to garbage collection, and wGroup ceases to exist as a valid group handle.
Tip Tip
This function allows the direct manipulation of a memory location and should be used with extreme care.
Examples
This example uses MemGrpClose() to close two different groups.
X#
1w1 := MemGrpOpen()                // 1
2IF w1 != 0
3    ? MemGrpClose(w1)        // TRUE
4ENDIF
5IF w2 != 0
6    w2 := MemGrpOpen()        // 1 (Same handle is reused)
7ENDIF
8MemGrpClose(w2)                // TRUE
See Also