At 2:21 PM +0100 18-04-00, Dave Lippincott wrote:
>Are you sure about that?  I don't have a title entered in constructor and
>all seems to be well after I change the form's title.  It doesn't seem to be
>leaking memory.

There are two ways to change a form's title!

FrmSetTitle - replaces the pointer in the form object with the pointer you
pass.  You are responsible for memory management.

FrmCopyTitle - copies characters from the string you pass into the string
embedded in the form object (or into whatever the current form title
pointer points to.)

If you use FrmCopyTitle, you don't have to worry about memory management,
but if you pass a string that's longer than the one originally created from
the resource, then you'll overflow the buffer and stomp on other form
objects, typically causing them to move or disappear.

                                --Bob



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to