Declaring the variable:
-------------------------------
// top of source file
char **gListChoices=0;
// within block of code
itemList = (Char **) MemPtrNew(16 * sizeof(Char *));
gListChoices=itemList;
Releasing the variable:
-------------------------------
Int16 i;
if(gListChoices!=0) {
for(i=0; i<16; i++) {
MemPtrFree((MemPtr) gListChoices[i]);
}
MemPtrFree((Char **) gListChoices);
}
It is a global variable for a list that is displayed in a form.
On 12/12/06, Pinus Alba <[EMAIL PROTECTED]> wrote:
Hi Luis,
How do you declare the variable?
How are you trying to release the variable?
Regards,
On 12/12/06, Luis Cordova < [EMAIL PROTECTED]> wrote:
> Hi,
>
> I want to release a global memory variable in my program before leaving
the app.
>
> I have tried to release memory in the event loop when is about to exit
> the application however I had no success.
>
> who can help me please,
>
> luis
>
> --
> -------------------------------------------------------
>
> --
> For information on using the PalmSource Developer Forums, or to
unsubscribe, please see
http://www.palmos.com/dev/support/forums/
>
-- For information on using the PalmSource Developer Forums, or to
unsubscribe, please see
http://www.palmos.com/dev/support/forums/
--
-------------------------------------------------------
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/