> Regarding hide() > > so if this is called i can in effect consider it deleted?
It retains some memory, but not enough to be a problem in any normal case - it will (usually, on most platforms) release some resources and so forth, that will need to be grabbed again when/if the window is shown again, but that's not an issue. > the memory > will not be freed until the program completely exits though? Correct. For window objects that last the lifetime of the program, explicitly deleting them is seldom of any value - the OS runtime will free the allocated memory when the program terminates much more quickly and efficiently than the C++ destructors can, so it is usually faster just to terminate your program than it is to try and "tidy up" on exit. > and so show > () can be called to see same instance of object again.. Correct. > why does a window get deleted if hidden but not if showing > when mainwindow > is destroyed behind it as in my example? Each (non-embedded) window is a top-level window in its own right, known to the WM, and to the fltk core - destroying one window does not affect the others, except when you have explicitly linked them together, e.g. (on most platforms) if a window is related to a "parent" window using either the modal() or nonmodal() relationship, then hiding the parent will usually hide the [non]modal "child"... Note that if you call Fl::run(); in your entry point code, that will never return while any window is mapped, so until all the windows are hidden or otherwise destroyed, your program will not terminate. This is normal. SELEX Galileo Ltd Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL A company registered in England & Wales. Company no. 02426132 ******************************************************************** This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ******************************************************************** _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

