Author: manolo
Date: 2012-06-12 08:58:09 -0700 (Tue, 12 Jun 2012)
New Revision: 9589
Log:
Fixed STR#2848: Mac OS: close putative memory leak when detaching child threads.
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-06-12 15:36:33 UTC (rev
9588)
+++ branches/branch-3.0/src/fltk3/cocoa.mm 2012-06-12 15:58:09 UTC (rev
9589)
@@ -1257,6 +1257,9 @@
selector:@selector(anyWindowWillClose:)
name:NSWindowWillCloseNotification
object:nil];
+ // necessary for secondary pthreads to be allowed to use cocoa,
+ // especially to create an NSAutoreleasePool.
+ [NSThread detachNewThreadSelector:nil toTarget:nil withObject:nil];
}
}
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit