Author: manolo
Date: 2012-09-28 00:59:13 -0700 (Fri, 28 Sep 2012)
New Revision: 9687
Log:
Added missing use of NSAutoreleasePool object in calc_mac_os_version().
Modified:
branches/branch-3.0/src/fltk3/cocoa.mm
Modified: branches/branch-3.0/src/fltk3/cocoa.mm
===================================================================
--- branches/branch-3.0/src/fltk3/cocoa.mm 2012-09-27 13:15:26 UTC (rev
9686)
+++ branches/branch-3.0/src/fltk3/cocoa.mm 2012-09-28 07:59:13 UTC (rev
9687)
@@ -3222,9 +3222,11 @@
*/
static int calc_mac_os_version() {
int M, m, b = 0;
+ NSAutoreleasePool *localPool = [[NSAutoreleasePool alloc] init];
NSDictionary * sv = [NSDictionary
dictionaryWithContentsOfFile:@"/System/Library/CoreServices/SystemVersion.plist"];
const char *s = [[sv objectForKey:@"ProductVersion"] UTF8String];
sscanf(s, "%d.%d.%d", &M, &m, &b);
+ [localPool release];
return M*10000 + m*100 + b;
}
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit