"Stephen Bentley" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > MemHandleFree(stringH) I'm guessing???
You guessed right. Just unlocking the handle won't free the chunk. There should be a matching MemHandleFree for every MemHandleNew(and a MemHandleUnlock for every MemHandleLock). Likewise with MemPtrNew and MemPtrFree. For small strings that you only need temporarily(i.e. only in the function itself), you might get away with allocating a Char array on the stack. For example: Char str[4]; StrCopy(str, "Hi!"); This saves you from having to allocate and free chunks manually. If you're working with strings a lot it might be worthwhile to put together a C++ class that encapsulates common string operations like concatenation and comparison. (I'm using a home-made String class in my own projects.) Regards -Laurens -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
