Didn't try.

I still investigate if this is another leak in my application.
I find this task (memory debugger) to be very frustrating.


-----Original Message-----
From: Stanimir Stamenkov [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 09, 2007 3:30 PM
To: j-users.xerces.apache.org
Subject: Re: Memory leak in DomParser

/Avihai Marchiano/:

> I test it with JProbe and it seems that the diagnostic, which describe

> in the following post is the problem:
> 
>
http://mail-archives.apache.org/mod_mbox/xerces-j-users/200212.mbox/%3c2
[EMAIL PROTECTED]

Have you tried the proposed changes from the referenced message?

 From the referenced message:

> I have traced down the error. It seems that the trouble is in 
> java.lang.StringBuffer class. In the class 
> org.apache.xerces.dom.DeferredDocumentImpl is a final 
> StringBuffer variable fBufferStr. In the method 
> getNodeValueString(...) is this StringBuffer reseted by calling
> 
> fBufferStr.setLength(0);
> 
> but somehow the memory is not free, even if you call garbage 
> collector immediately after reseting. I removed the "final" 
> keyword from fBufferStr declaration and replaced reseting by:
> 
> fBufferStr = new StringBuffer();
> 
> and it worked fine (without memory error).

Compiling Xerces on your own is fairly easy task - just download the
source and tools packages (the tools have to be unpacked into the
unpacked source directory) make the necessary changes and run the
build script.

-- 
Stanimir


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to