mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Help avoid programs getting huge memory footprints when they don't need to.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@23077 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
61e201d3fe
commit
cefd7bacac
3 changed files with 32 additions and 44 deletions
|
@ -405,6 +405,7 @@ static NSComparisonResult tSort(GSIArrayItem i0, GSIArrayItem i1)
|
|||
|
||||
- (void) _checkPerformers: (GSRunLoopCtxt*)context
|
||||
{
|
||||
CREATE_AUTORELEASE_POOL(arp);
|
||||
if (context != nil)
|
||||
{
|
||||
GSIArray performers = context->performers;
|
||||
|
@ -462,9 +463,11 @@ static NSComparisonResult tSort(GSIArrayItem i0, GSIArrayItem i1)
|
|||
{
|
||||
[array[i] fire];
|
||||
RELEASE(array[i]);
|
||||
IF_NO_GC([arp emptyPool]);
|
||||
}
|
||||
}
|
||||
}
|
||||
RELEASE(arp);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -793,6 +796,7 @@ extern IMP wRetImp;
|
|||
&& ([timerDate(t) timeIntervalSinceReferenceDate] <= now))
|
||||
{
|
||||
[t fire];
|
||||
IF_NO_GC([arp emptyPool]);
|
||||
now = GSTimeNow();
|
||||
}
|
||||
|
||||
|
@ -831,6 +835,7 @@ extern IMP wRetImp;
|
|||
RELEASE(min_timer);
|
||||
}
|
||||
GSNotifyASAP(); /* Post notifications. */
|
||||
IF_NO_GC([arp emptyPool]);
|
||||
}
|
||||
_currentMode = savedMode;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue