Hi Luis,

There should (normally) be a MemPtrFree for every block of memory allocated
by MemPtrNew.

In the code you show there is only one MemPtrNew which requests a block of
memory 64 bytes long (16*sizeof (char*)).

How are you assigning values to the pointers within gListChoices?

Regards,

On 12/12/06, Luis Cordova <[EMAIL PROTECTED]> wrote:
>
> 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.
>
>

-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to