From 1fb5ff28ae867d00c446ccdb3ab48a3df2b9f54f Mon Sep 17 00:00:00 2001 From: mccallum Date: Thu, 31 Oct 1996 17:59:25 +0000 Subject: [PATCH] ([RunLoop -limitDateForMode:]): Bracket timer firing with a retain/release of the MIN_TIMER. (Reported by Richard Frith-Macdonald .) git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1892 72102866-910b-0410-8b05-ffd578937521 --- Source/RunLoop.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/RunLoop.m b/Source/RunLoop.m index 744438861..e91f9129e 100644 --- a/Source/RunLoop.m +++ b/Source/RunLoop.m @@ -337,6 +337,7 @@ static RunLoop *current_run_loop; while ((min_timer = [timers minObject]) && ([[min_timer fireDate] timeIntervalSinceNow] > 0)) { + [min_timer retain]; [timers removeFirstObject]; /* Firing will also increment its fireDate, if it is repeating. */ if ([min_timer isValid]) @@ -345,6 +346,7 @@ static RunLoop *current_run_loop; if ([[min_timer fireDate] timeIntervalSinceNow] < 0) [timers addObject: min_timer]; } + [min_timer release]; } if (debug_run_loop) printf ("\tRunLoop limit date %f\n",