If you're just changing the data in the original
title (getting the CharPtr & writing your new
title to it -- being careful that your new title is
no longer than the original one!) then you don't
have to do anything. If you are allocating new
memory and setting that into the title (or field)
then it is up to you to release it when you're done.
--
-Richard M. Hartman
[EMAIL PROTECTED]
186,000 mi/sec: not just a good idea, it's the LAW!
Dave Lippincott wrote in message <8515@palm-dev-forum>...
>
>does anyone know for sure?
>
>-----Original Message-----
>From: Tim Astle <[EMAIL PROTECTED]>
>Newsgroups: palm-dev-forum
>To: Palm Developer Forum <[EMAIL PROTECTED]>
>Date: Monday, April 17, 2000 10:40 AM
>Subject: Re: Form Titles
>
>
>>I assume when you release your forms, it would also take care of your
>>assigned variable. This post is similar to the news post from earlier
>today
>>entitled, "Fields driving me crazy"
>>
>>Anyone else have insights to this as well?
>>
>>--
>>
>>Tim Astle
>>
>>
>>
>>Dave Lippincott <[EMAIL PROTECTED]> wrote in message
>>news:8513@palm-dev-forum...
>>>
>>> Do I need to free the memory associated to a CharPtr if its assigned to
>>the
>>> form title? Or does the form free the title memory for me?
>>>
>>> i.e.
>>> CharPtr MyCharPtr;
>>> FormPtr MyForm;
>>>
>>> MyForm = FrmInitForm(MyFormID);
>>> MyCharPtr = MemPtrNew(StrLen("Some Title")+1);
>>> StrCopy(MyCharPtr,"Some Title");
>>> FrmSetTitle(MyForm,MyCharPtr);
>>> FrmDoDialog(MyForm);
>>>
>>> MemPtrFree(MyCharPtr); // Does this need to be done?
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>--
>>For information on using the Palm Developer Forums, or to unsubscribe,
>please see http://www.palm.com/devzone/mailinglists.html
>>
>>
>
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html