>You should _not_ call XalanTransformer::destroyParsedSource() with an
>instance you create yourself on the stack. The documentation is explicit
>about this.
But what I have to do? Doing a simple
for(;;)
{
XercesDOMWrapperParsedSource
oSource (oDocument,
oParserLiaison,
oDOMSupport,
XalanDOMString("FormatterInputSource"));
int nResult =
oTransformer.transform(oSource,
oStylesheet,
oResult);
...
}
leads to growing memory also. I tried to put the Transformer instance into
to for()-scope, too. Nothing changed.
>Also, you don't need to do this:
>
> delete [] oOStream.str();
>
>since you haven't called ostrstream::str().
Ups, I have found a mail of yours in xalan-dev where you write
"
>If you use the str() member function of ostrstream, you must either call
>ostrstream::freeze() with a value of false, or delete the pointer yourself:
"
So I thought I have to delete the memory.
>I don't know if there's a memory leak issue. We haven't found one, but
>I'll try to do some testing with your code.
That would be very fine. If I can help you, feel free to contact me. In the
meantime I will serialize the Xerces-DOM to a stream :^)
HolgeR