* DumpRenderTree/DumpRenderTree.m: (dumpRenderTree): Add more auto-release...
[WebKit-https.git] / WebKitTools / DumpRenderTree / DumpRenderTree.m
index 7d7a047e9ca6b5833d5ac58b38258854981f3477..cc24accd183c931f6ce76b9da3c8fd24de3512c6 100644 (file)
@@ -217,9 +217,12 @@ static void dumpRenderTree(const char *filename)
     dumpAsText = NO;
     waitLayoutTest = NO;
 
     dumpAsText = NO;
     waitLayoutTest = NO;
 
+    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
     [frame loadRequest:[NSURLRequest requestWithURL:(NSURL *)URL]];
     [frame loadRequest:[NSURLRequest requestWithURL:(NSURL *)URL]];
-    NSDate *date = [NSDate distantPast];
+    [pool release];
     while (!done) {
     while (!done) {
-        [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:date];
+        pool = [[NSAutoreleasePool alloc] init];
+        [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantPast]];
+        [pool release];
     }
 }
     }
 }