I created a link-list, and the link-list class provides destructor. the
destructor is as following:
void PlayerList::removeAll()
{
 playerNode *pPlayerListPtr;
 while (head)
 {
  MemPtrFree(head->player);
  pPlayerListPtr = head->next;
  MemPtrFree(head);
  head = pPlayerListPtr;
 }
}

When I exit the form, I delete the link-list i created, and it will call
this destructor. The first time I exit the form, everything is good; but if
I open the form again and then exit, the emulator report an error:
"read from memory location 0x0003C490, which is in an unallocated chunk of
memory."

How can i solve this problem?
thanks a lot!
fan



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

Reply via email to