Re: Memory leaking

Russell Gold <[email protected]>
Newsgroups gmane.comp.web.httpunit.devel
Message-ID <[email protected]>
On Dec 21, 2006, at 2:06 PM, andresgr wrote:

> I found the leak!
>
> This Netbeans profiler tool is really amazing :)
>
> Well, the fact: the memory was allocated by
>
> private void handleScriptException( Exception e, String badScript )
>
> in com.meterware.httpunit.javascript.JavaScript$JavaScriptEngine
>
> and I discovered that HttpUnit stores *all* JavaScript Exceptions in a
> private buffer, which *you* have to clear manually from time to time,
> if you don't want to loose your memory along the way :)
>
> The "buffer":
>
> private static ArrayList _errorMessages = new ArrayList();
>
> You can clear that buffer calling:
>
> HttpUnitOptions.clearScriptErrorMessages();
>
> I think this "feature" should be disabled by default or... i don't
> know, use a buffer of limited size...

Or should be tied to the web response. Thanks for finding this. It  
goes on my list of things to fix.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.