Click or drag to resize

Functions.MemFree Method

Deallocate a specified memory buffer.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.07
Syntax
 FUNCTION MemFree(
	pMem AS IntPtr
) AS WORD
View Source

Parameters

pMem
Type: IntPtr

Return Value

Type: UInt16
0 if successful; otherwise, 65,535.
Remarks
Tip Tip
The Static Memory Functions (MemAlloc, MemSet etc) are included for compatibility only. In most cases the static memory blocks can (and should) be replaced with arrays of bytes.
Many of the functions in the runtime that take memory blocks as parameter, such as the low level IO functions, now have overloads that take arrays of bytes as parameter.
We recommend that you use these overloads, because their performance is somewhat better.
See Also