Wrap WIN32 server call to windowEventProc with an autorelease pool to avoid holding window surfaces causing memory issues

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/gnustep_testplant_branch@36609 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Marcian Lytwyn 2013-05-10 01:21:18 +00:00
parent 16ef33d4c4
commit 5006663d2d

View file

@ -39,6 +39,7 @@
#include <Foundation/NSTimer.h> #include <Foundation/NSTimer.h>
#include <Foundation/NSUserDefaults.h> #include <Foundation/NSUserDefaults.h>
#include <Foundation/NSException.h> #include <Foundation/NSException.h>
#include <Foundation/NSAutoreleasePool.h>
#include <AppKit/AppKitExceptions.h> #include <AppKit/AppKitExceptions.h>
#include <AppKit/NSApplication.h> #include <AppKit/NSApplication.h>
#include <AppKit/NSGraphics.h> #include <AppKit/NSGraphics.h>
@ -457,7 +458,7 @@ BOOL CALLBACK LoadDisplayMonitorInfo(HMONITOR hMonitor,
// MESSAGE PROCESSING!!!!! // MESSAGE PROCESSING!!!!!
TranslateMessage(&msg); TranslateMessage(&msg);
DispatchMessage(&msg); DispatchMessage(&msg);
} }
} }
} }
@ -3319,6 +3320,9 @@ LRESULT CALLBACK MainWndProc(HWND hwnd, UINT uMsg,
return (LRESULT)NULL; return (LRESULT)NULL;
} }
return [ctxt windowEventProc: hwnd : uMsg : wParam : lParam]; NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
LRESULT status = [ctxt windowEventProc: hwnd : uMsg : wParam : lParam];
[pool release];
return status;
} }