diff options
Diffstat (limited to 'UnitTesting/GTMFoundationUnitTestingUtilities.m')
-rw-r--r-- | UnitTesting/GTMFoundationUnitTestingUtilities.m | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/UnitTesting/GTMFoundationUnitTestingUtilities.m b/UnitTesting/GTMFoundationUnitTestingUtilities.m index 5304990..2f278d7 100644 --- a/UnitTesting/GTMFoundationUnitTestingUtilities.m +++ b/UnitTesting/GTMFoundationUnitTestingUtilities.m @@ -92,14 +92,17 @@ context:(id<GTMUnitTestingRunLoopContext>)context { BOOL contextShouldStop = NO; NSRunLoop *rl = [NSRunLoop currentRunLoop]; + NSDate* next = nil; while (1) { contextShouldStop = [context shouldStop]; if (contextShouldStop) break; - NSDate* next = [[NSDate alloc] initWithTimeIntervalSinceNow:0.01]; + next = [[NSDate alloc] initWithTimeIntervalSinceNow:0.01]; if (!([rl runMode:mode beforeDate:next])) break; if ([next compare:date] == NSOrderedDescending) break; [next release]; + next = nil; } + [next release]; return contextShouldStop; } |