changeset 698:e19f69a78f21

Fix for pool being removed and not just drained.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 11 Mar 2011 01:49:09 +0000
parents 830e1f3672b9
children b79300831495
files mac/dw.m
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mac/dw.m	Thu Mar 10 23:28:10 2011 +0000
+++ b/mac/dw.m	Fri Mar 11 01:49:09 2011 +0000
@@ -6966,8 +6966,9 @@
 {
 #if !defined(GARBAGE_COLLECT)
     NSAutoreleasePool *pool = pthread_getspecific(_dw_pool_key);
-    NSLog(@"Pool draining %x", (int)pool);
     [pool drain];
+    pool = [[NSAutoreleasePool alloc] init];
+    pthread_setspecific(_dw_pool_key, pool);
 #endif    
 }
 
@@ -6989,6 +6990,7 @@
    threadfunc(tmp[1]);
     /* Release the pool when we are done so we don't leak */
 #if !defined(GARBAGE_COLLECT)
+    pool = pthread_getspecific(_dw_pool_key);
 	[pool release];
 #endif
    free(tmp);