> Yes; setting parent() 'seems to work',
> though I noticed the current() technique is what
> fltk's own fl_message/fl_ask dialog is using.
I was wondering how setting parent(0) would affect memory management,
which led to another surprise. Isn't win2 supposed to get
destructed in the following?
////////////////////////////////////////////////////////////////
#include <FL/Fl_Double_Window.H>
#include <FL/Fl.H>
#include <iostream>
class MyWindow : public Fl_Double_Window {
public:
MyWindow(int x, int y, char const* label = 0)
: Fl_Double_Window(x, y, label)
{;}
~MyWindow() { std::cout << "Deleted " << label() << std::endl; }
};
int main()
{
MyWindow* win1 = new MyWindow(300, 300, "Window 1");
MyWindow* win2 = new MyWindow(300, 300, "Window 2");
win2->end();
// win2->parent(0);
win1->end();
delete win1;
return 0;
}
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk