diff options
author | culler <culler> | 2020-08-12 15:21:52 (GMT) |
---|---|---|
committer | culler <culler> | 2020-08-12 15:21:52 (GMT) |
commit | 12d683ceaacf4fff94e6e25ba528c29b000fa90b (patch) | |
tree | cb1f587603d00eb47e068eca173b89389d0fbd9e /macosx/tkMacOSXMenu.c | |
parent | 439d2b630bdbd573b5046781faca5166ea652f56 (diff) | |
download | tk-12d683ceaacf4fff94e6e25ba528c29b000fa90b.zip tk-12d683ceaacf4fff94e6e25ba528c29b000fa90b.tar.gz tk-12d683ceaacf4fff94e6e25ba528c29b000fa90b.tar.bz2 |
Fix some issues with 10.6
Diffstat (limited to 'macosx/tkMacOSXMenu.c')
-rw-r--r-- | macosx/tkMacOSXMenu.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c index 379e25c..a77ea59 100644 --- a/macosx/tkMacOSXMenu.c +++ b/macosx/tkMacOSXMenu.c @@ -139,6 +139,7 @@ static int ModifierCharWidth(Tk_Font tkfont); @implementation TKBackgroundLoop - (void) main { + NSAutoreleasePool *pool = [NSAutoreleasePool new]; NSArray *modeArray = [NSArray arrayWithObjects: NSEventTrackingRunLoopMode, nil]; while(1) { @@ -151,7 +152,7 @@ static int ModifierCharWidth(Tk_Font tkfont); withObject:nil waitUntilDone:true modes:modeArray]; - if (self.cancelled) { + if ([self isCancelled]) { [NSThread exit]; } @@ -161,6 +162,7 @@ static int ModifierCharWidth(Tk_Font tkfont); [NSThread sleepForTimeInterval:0.001]; } + [pool drain]; } @end |