1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META name="GENERATOR" content="Microsoft FrontPage 5.0">
6<META http-equiv="Content-Style-Type" content="text/css">
7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
8<TITLE>MTXFreeStack</TITLE>
9</HEAD>
10<BODY>
11<H1>MTXFreeStack</H1>
12
13<H2>Syntax</H2>
14<dl><dd><pre class="construction">
15#include &lt;revolution/mtx.h&gt;
16
17#define MTXFreeStack( sPtr ) \
18( OSFree( (void*)( ((MtxStackPtr)(sPtr))-&gt;stackBase ) ) )
19</pre></dd></dl>
20
21<H2>Arguments</H2>
22<TABLE class="arguments" border="1" >
23  <TBODY>
24    <TR>
25<TH>sPtr</TH>
26<TD>The <a href="../Structures/MtxStack_MtxStackPtr.html"><code>MtxStack</code></a> structure from which stack memory will be freed.<br>Note that this frees <code><strong><em>sPtr</em>-&gt;stackBase</strong></code>; it has no effect on <code><em><strong>sPtr</strong></em></code> itself.</TD>
27    </TR>
28  </TBODY>
29</TABLE>
30
31<H2>Return Values</H2>
32<P>None.</P>
33
34<H2>Description</H2>
35<P>This macro is defined in <code>mtx.h</code>.&nbsp;<code>MTXFreeStack</code> frees the memory previously allocated to <SPAN class="argument">sPtr</SPAN><STRONG><CODE>-&gt;stackBase</CODE></STRONG> by <a href="MTXAllocStack.html"><code>MTXAllocStack</code></a>.</P>
36<P><code>MTXFreeStack</code> uses the <a href="../../os/Alloc/OSFree.html"><code>OSFree</code></a> routine to free matrix stack memory previously allocated to <code><em><strong>sPtr</strong></em></code>.&nbsp;It is defined as a macro to expose the memory-freeing routine in the <code>mtx.h</code> header file.&nbsp;This insulates <CODE>mtx.lib</CODE> from changes to the OS memory management routines. Changes to the OS deallocation routines require only a redefinition of the <CODE>MTXFreeStack</CODE> function and a recompile of <CODE>mtx.h</CODE>.</P>
37
38<H2>See Also</H2>
39<P class="reference">
40<A href="../structures/Mtx_MtxPtr.html">Mtx, MtxPtr</A>,
41<A href="../structures/MtxStack_MtxStackPtr.html">MtxStack, MtxStackPtr</A>,
42<A href="MTXAllocStack.html">MTXAllocStack</A>,
43<A href="MTXInitStack.html">MTXInitStack</A>,
44<A href="../../os/Alloc/OSAlloc.html">OSAlloc</A>,
45<A href="../../os/Alloc/OSFree.html">OSFree</A>
46</P>
47
48<H2>Revision History</H2>
49<P>
502006/03/01 Initial version.<br>
51</P>
52
53<hr><p>CONFIDENTIAL</p></body>
54</HTML>