> I have a main window with a menu bar. One of the menus should be "&Exit" > and the callback should terminate the application. > > As I read, I should delete the main window. If I do a > Fl::delete_widget(win) my application crashes with double free corruption. > > Any hints?
Fl::run() will return if all the windows are hidden, so just calling main_window->hide(); should do the trick. Deleting the window is seldom useful - the system will reap the window's children on application exit anyway, which may be what's triggering your double-free warnings I'd guess. 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

