You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by bu...@apache.org on 2002/07/15 09:55:29 UTC

DO NOT REPLY [Bug 10821] New: - Memory leak in DOMParser

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10821>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10821

Memory leak in DOMParser

           Summary: Memory leak in DOMParser
           Product: Xerces-C++
           Version: 1.7.0
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Non-Validating Parser
        AssignedTo: xerces-c-dev@xml.apache.org
        ReportedBy: derek_proff@yahoo.co.uk


I have found a memory leak in the DOMParser class. The parser method seem to 
leak memory every time I call it. I compiled the one of the samples (MemParse) 
and it also seem to loose memory. 

I parse a xml stream from memory using the MemBufInputSource class. The leak 
size depends on the size of the xml stream.
I have written a server type application that resolves xml requests from the 
web. If the application runs through a few request, I loose a significaqnt 
amount of memory. Is there something that I do not initialise or something 
thast I might be doing wrong?

Code:
XMLPlatformUtils::Initialize();
DOMParser *p = new DOMParser();
MemBufInputSource source(...);
try{
   p->parse(source); // This statement seem to loose memory.
}
catch{ ... }
delete p;
XMLPlatformUtils::Terminate();

regards
Derek

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org