At 11:14 PM 5/20/2004, you wrote:
UInt32 i;
int  logStringLength = 0;
Char* integerString = 0;

integerString = MemPtrNew(maxStrIToALen);
StrIToA(integerString, i);

This can work, but for such a small amount of memory, it's better, IMO, to just say "char integerString[maxStrIToALen];" to declare a buffer of sufficient size on the stack. Of course, if you need this string around after this function exits, putting it on the dynamic heap is a good choice.



-- Ben Combee, DTS technical lead, PalmSource, Inc. Read "Combee on Palm OS" at http://palmos.combee.net/



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

Reply via email to