"bullshark" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Yes I am. Deallocating is: > > if(pListTxt != NULL) //pretty hard { > memPtrFree(pListText); //huh? pListText=NULL; //?? }
> and there are at most two of those clauses for a dynamic list. > Since one of those is in the builder method, it is never repeated > for additional lists. Additional lists get one clause in the > stop program method. Sounds like you're using C++, in which case deallocating such memory is easily done in a destructor, but using C however requires the use of globals, and also violates the coding practice of trying to unallocate memory from within the same function in which it was allocated. I'm not saying either way is wrong... Just offering reasons why some people choose different methods. Have a nice day :-) Alan -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
