From b0d3b0c20aa3a50462fb883f3cc5686b660d3249 Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Thu, 15 Jul 2010 00:07:42 +0000 Subject: [Author: dmaclach] Clean up some leaks found by the analysis tools. R=mrossetti DELTA=6 (5 added, 0 deleted, 1 changed) --- UnitTesting/GTMFoundationUnitTestingUtilities.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'UnitTesting/GTMFoundationUnitTestingUtilities.m') 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)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; } -- cgit v1.2.3