From 93372a77c1d0d5affd3715e4fbbbfd86e85831fe Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 18 Feb 2015 06:20:57 +0000 Subject: [PATCH] Mac OS: Fixed issue where the system object supporting a window created before the event loop started could not be deallocated. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10586 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_cocoa.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 17b006d86..ecf46a66a 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -2823,6 +2823,7 @@ static void set_subwindow_frame(Fl_Window *w) { // maps a subwindow at its corre */ void Fl_X::make(Fl_Window* w) { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; Fl_Group::current(0); fl_open_display(); NSInteger winlevel = NSNormalWindowLevel; @@ -3041,6 +3042,7 @@ void Fl_X::make(Fl_Window* w) Fl::e_number = old_event; // if (w->modal()) { Fl::modal_ = w; fl_fix_focus(); } + [pool release]; }