This is exactly what I changed to.  Works fine as long as the string I am using
does not exceed the length.  Even for a string that varies greatly in length I
can use a static MemPtr and allocate/dellocate dynamically.

I found I need to watch out when I pass this string to another function, in
which that util function is called again!

Max
--- Bob Whiteman <[EMAIL PROTECTED]> wrote:
> I think the worst risk in using an unlocked handle is that you get a bug
> that is very difficult to reproduce. The program may simply crash for no
> apparent reason.
> 
> Cleanup is always a burden in Palm OS programs, but there are some
> techniques that can ease this. When I had a situation similar to yours I set
> a maximum length of a string in a resource and wrote a utility function like
> this one:
> 
> char *GetResourceString( UInt16 id ) {
>   static char string[256];



=====
http://www.weirdwww.com/

__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

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

Reply via email to