Thanks a lot cbruner It is done and working very well Regards, Micky
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of cbruner Sent: Thursday, July 27, 2006 11:45 PM To: Palm Developer Forum Subject: Re: Memory Leak Helmut A. Bender wrote: > Am Donnerstag, 27. Juli 2006 15:40 schrieb Micky MeNeZeS: > >> I have got following code. >> [...] >> > > It seems you don't initialize the buffer you create. So the check in > StringCopy > >> if (StrLen(aBuffer) == 0) >> > won't work, since StrLen will get a random value. Set the first byte of the > buffer to '\0' at the beginning. > > The rest seems quite nice to me... > > Good eyes. Also as a matter of style, you might want to keep a pointer showing where the string was last appended to. Then pass the pointer to your function for appending strings. Then it doesn't have to look through the whole buffer each time it needs to append onto the end of it. -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
