diff options
author | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2010-07-15 00:07:42 +0000 |
---|---|---|
committer | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2010-07-15 00:07:42 +0000 |
commit | b0d3b0c20aa3a50462fb883f3cc5686b660d3249 (patch) | |
tree | c6f5da0da3747bde1f56398c85e5b8beca7a7018 /UnitTesting/GTMFoundationUnitTestingUtilities.m | |
parent | 02d98bd11191650937e513cd0b52878de0474d7c (diff) |
[Author: dmaclach]
Clean up some leaks found by the analysis tools.
R=mrossetti
DELTA=6 (5 added, 0 deleted, 1 changed)
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; } |