mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
([RunLoop -limitDateForMode:]): Bracket timer firing with a
retain/release of the MIN_TIMER. (Reported by Richard Frith-Macdonald <richard@brainstorm.co.uk>.) git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1892 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b2db27dcad
commit
1fb5ff28ae
1 changed files with 2 additions and 0 deletions
|
@ -337,6 +337,7 @@ static RunLoop *current_run_loop;
|
||||||
while ((min_timer = [timers minObject])
|
while ((min_timer = [timers minObject])
|
||||||
&& ([[min_timer fireDate] timeIntervalSinceNow] > 0))
|
&& ([[min_timer fireDate] timeIntervalSinceNow] > 0))
|
||||||
{
|
{
|
||||||
|
[min_timer retain];
|
||||||
[timers removeFirstObject];
|
[timers removeFirstObject];
|
||||||
/* Firing will also increment its fireDate, if it is repeating. */
|
/* Firing will also increment its fireDate, if it is repeating. */
|
||||||
if ([min_timer isValid])
|
if ([min_timer isValid])
|
||||||
|
@ -345,6 +346,7 @@ static RunLoop *current_run_loop;
|
||||||
if ([[min_timer fireDate] timeIntervalSinceNow] < 0)
|
if ([[min_timer fireDate] timeIntervalSinceNow] < 0)
|
||||||
[timers addObject: min_timer];
|
[timers addObject: min_timer];
|
||||||
}
|
}
|
||||||
|
[min_timer release];
|
||||||
}
|
}
|
||||||
if (debug_run_loop)
|
if (debug_run_loop)
|
||||||
printf ("\tRunLoop limit date %f\n",
|
printf ("\tRunLoop limit date %f\n",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue