From a514082994e73157077949948b61c447ff986330 Mon Sep 17 00:00:00 2001 From: scottbrady Date: Tue, 21 Jun 2011 12:41:15 -0700 Subject: [PATCH] Delete the source code from the token cache when we're done calculating statistics. This greatly reduces memory usage when running coverage against many files. Paired with Mark French. --- PHP/CodeCoverage/Report/HTML/Node/File.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PHP/CodeCoverage/Report/HTML/Node/File.php b/PHP/CodeCoverage/Report/HTML/Node/File.php index 7643e940a..0fa19e384 100644 --- a/PHP/CodeCoverage/Report/HTML/Node/File.php +++ b/PHP/CodeCoverage/Report/HTML/Node/File.php @@ -169,6 +169,8 @@ public function __construct($name, PHP_CodeCoverage_Report_HTML_Node $parent, ar ); $this->calculateStatistics(); + + PHP_Token_Stream_CachingFactory::delete($path); } /**