* Source/NSColorPanel.m (-_magnify:): Use a local auto release

pool in loop.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36613 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2013-05-11 20:32:20 +00:00
parent ba3be347fb
commit 118dac6092
2 changed files with 10 additions and 2 deletions

View file

@ -27,6 +27,7 @@
*/
#import "config.h"
#import <Foundation/NSAutoreleasePool.h>
#import <Foundation/NSBundle.h>
#import <Foundation/NSEnumerator.h>
#import <Foundation/NSException.h>
@ -389,7 +390,8 @@ static int _gs_gui_color_picker_mode = NSRGBModeColorPanel;
do {
NSPoint mouseLoc;
NSImage *img;
CREATE_AUTORELEASE_POOL(pool);
currentEvent = [NSApp nextEventMatchingMask: NSLeftMouseDownMask | NSLeftMouseUpMask | NSMouseMovedMask
untilDate: [NSDate distantFuture]
inMode: NSEventTrackingRunLoopMode
@ -406,7 +408,8 @@ static int _gs_gui_color_picker_mode = NSRGBModeColorPanel;
NSColor *color = [rep colorAtX: 0 y: 0];
[self setColor: color];
}
} while ([currentEvent type] != NSLeftMouseUp &&
[pool drain];
} while ([currentEvent type] != NSLeftMouseUp &&
[currentEvent type] != NSLeftMouseDown);
}
NS_HANDLER