Re: XForms: fl_hide_form

Steve Lamont (spl@szechuan.ucsd.edu)
Wed, 18 Jun 97 13:20:00 PDT

To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> Several weeks ago, I saw a reference on this list which implied
> fl_hide_form (*x) surrendered the memory allocated to x. Is this true?
> create_form_... must be called after each fl_hide_form?

Not exactly.

What is free()d is any internal memory associated with the objects and
the Window or Windows. This means that if you've got a Canvas object
in the form, the Window belonging to the Canvas is blown away as well
as the surrounding XForms Window. If you've attached anything to the
objects in the u_vdata fields that memory should be okay.

You definitely do not need to create the form -- this will create an
entirely new data structure, which is probably not what you want to
do.

Of course, if you do a fl_free_form() this blows away the form and the
objects. It does not, however, free() the memory associated with the
FD_whatever data structure returned by the create function.

spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/