Abhinav Kishore Srivastava wrote:
Hi,
Does that mean I don't have to create the parser and membuf objet with 'new'??
If not then how should I create it? In my application the same process receives
request for xml parsing at different times. Each time I am creating a new
object of parser and then deleting it too.
You can create them on the stack:
MemBufInputSource membuf(
(const XMLByte*)theString.data(),
theString.size(),
"APIXMLInterface",
false);
XercesDOMParser localParser;
m_domParser = &localParser;
...
m_domParser = 0;
Although I don't know if that will help much, since the parser will
allocate memory dynamically regardless.
Also, I checked my process giving it a bad input. In that case the process gets core dump releasing all the memory acquired.
Why does your application core dump on bad input? The parser shouldn't
do that.
None of your evidence proves the Xerces-C library is leaking memory. I
suggest you test the parser code outside of your application to verify
if there is a memory leak.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]