Turn release messages sent to autorelease pools into drain messages. No

functionality change in non-GC mode, in GC mode it invokes a quick GC pass to
try to delete the short-lived objects.

Also deleted some [pool release] lines just before exit() or return-from-main
statements.  These cause objects to be swapped in and destructors to be run to
no benefit (the OS will reclaim this memory without requiring stuff to be
swapped in when the process exits).



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33146 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
theraven 2011-05-27 12:42:37 +00:00
parent ac36e417ea
commit dbd4c1b77c
15 changed files with 23 additions and 28 deletions

View file

@ -1156,7 +1156,7 @@ nsanimation_progressMarkSorter(NSAnimationProgress first, NSAnimationProgress se
[self _gs_startAnimationInOwnLoop];
NSDebugMLLog(@"NSAnimationThread",
@"End of %@", [NSThread currentThread]);
RELEASE(pool);
[pool drain];
_isThreaded = NO;
}
@ -1181,11 +1181,11 @@ nsanimation_progressMarkSorter(NSAnimationProgress first, NSAnimationProgress se
d = [loop limitDateForMode: NSAnimationBlockingRunLoopMode];
if (d == nil)
{
RELEASE(pool);
[pool drain];
break; // No inputs and no timers.
}
[NSThread sleepUntilDate: d];
RELEASE(pool);
[pool drain];
}
}
}