* DumpRenderTree/DumpRenderTree.m: (dumpRenderTree): Add more auto-release pools
        in the hope of making the tool use less memory and run faster.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@9436 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 7f358f1..beeb287 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,5 +1,10 @@
 2005-06-18  Darin Adler  <darin@apple.com>
 
+        * DumpRenderTree/DumpRenderTree.m: (dumpRenderTree): Add more auto-release pools
+        in the hope of making the tool use less memory and run faster.
+
+2005-06-18  Darin Adler  <darin@apple.com>
+
         * Scripts/cvs-apply: Improve handling of patches with CR characters in them.
         * Scripts/cvs-unapply: Ditto.
 
diff --git a/WebKitTools/DumpRenderTree/DumpRenderTree.m b/WebKitTools/DumpRenderTree/DumpRenderTree.m
index 7d7a047..cc24acc 100644
--- a/WebKitTools/DumpRenderTree/DumpRenderTree.m
+++ b/WebKitTools/DumpRenderTree/DumpRenderTree.m
@@ -217,9 +217,12 @@
     dumpAsText = NO;
     waitLayoutTest = NO;
 
+    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
     [frame loadRequest:[NSURLRequest requestWithURL:(NSURL *)URL]];
-    NSDate *date = [NSDate distantPast];
+    [pool release];
     while (!done) {
-        [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:date];
+        pool = [[NSAutoreleasePool alloc] init];
+        [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantPast]];
+        [pool release];
     }
 }