> FldSetTextPtr(field_ptr, "Testing Hardware...");
> FrmDrawForm(form_ptr);
> 
> then when i exit the form i call:
> 
> FrmEraseForm(form_ptr);
> FrmDeleteForm(form_ptr);
> 
> my question is: do i need to call FldSetTextPtr(field_ptr, NULL)?  Rather, a
> more fundamental question is what happens to the memory allocated by the
> FldSetTextPtr(field_ptr, "Testing Hardware...") when I call the form erase

> and delete functions?  is the memory holding the string freed up or not?

  if you define it the way you have, the string is actually stored inside
  the code segment (that is, it is never dynamically allocated). if you
  decompile your .prc file, you will find this string :)

  you dont have to set the text ptr to NULL - although, it wont crash if
  you do :)) if you are using a dynamic string instead of the static one,
  from memory you need to set it to NULL - before you free it. i had some
  small issues like this when dealign with it previously, and setting it
  to NULL, and then freeing the pointer after.. solved it.

// az
[EMAIL PROTECTED]
http://www.ardiri.com/    <--- free games!


-- 
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