Hi,
I’m a bit confused about what exactly happens if I interrupt a stand-alone GUI from a terminal by pressing Ctrl-C.
Will all memory used by the GUI be deallocated or do I have to make sure of that myself?
The application is set up like that:
[code]MyMainFrame::MyMainFrame(const TGWindow *p, UInt_t w, UInt_t h){
fMain = new TGMainFrame(p, w, h);
fMain->SetCleanup(kDeepCleanup);
fMain->Connect(“CloseWindow()”, “MyMainFrame”, fMain, “CloseWindow()”);
// …
}
MyMainFrame::~MyMainFrame(){ fMain->Cleanup(); }
void MyMainFrame::CloseWindow(){ gApplication->Terminate(); }
void myGui(){ new MyMainFrame(gClient->GetRoot(), 100, 100); }
int main(int argc, char **argv) {
TApplication theApp(“App”,&argc,argv);
myGui();
theApp.Run();
return 0;
}[/code]