MTXFreeStack

Syntax

#include <revolution/mtx.h>

#define MTXFreeStack( sPtr ) \
( OSFree( (void*)( ((MtxStackPtr)(sPtr))->stackBase ) ) )

Arguments

sPtr The MtxStack structure from which stack memory will be freed.
Note that this frees sPtr->stackBase; it has no effect on sPtr itself.

Return Values

None.

Description

This macro is defined in mtx.hMTXFreeStack frees the memory previously allocated to sPtr->stackBase by MTXAllocStack.

MTXFreeStack uses the OSFree routine to free matrix stack memory previously allocated to sPtr. It is defined as a macro to expose the memory-freeing routine in the mtx.h header file. This insulates mtx.lib from changes to the OS memory management routines. Changes to the OS deallocation routines require only a redefinition of the MTXFreeStack function and a recompile of mtx.h.

See Also

Mtx, MtxPtr, MtxStack, MtxStackPtr, MTXAllocStack, MTXInitStack, OSAlloc, OSFree

Revision History

2006/03/01 Initial version.


CONFIDENTIAL