Hi,
>>I also realized, that if I just remove XMLPlatformUtils::Terminate(),
there are a lot more memory-leaks:
Yes; Terminate was added to eliminate the reports of memory leaks by various
tools; my take on it is that it basically cleans up a bunch of static data
that is initialized / alloc'd and initialized in
XMLPlatformUtils::Initialize(). The docs would possibly have more...
>>I tried it to use xerces with an simple app I created with appwizard (MFC
appwizard EXE) and it produced the results.
>>do you have any further suggestions ? did you ever try to use Xerces
within an MFC-environment ?
Yes, I have successfully used Xerces (for SAX parsing - progressive and
standard) in an MFC Appwizard EXE application, and it works just fine. I
have no memory leaks (reported by any tools, at least! :) ), and all
behaviors are as expected.
>>Currently I am not using a content/error-handler ...
Based on your statement that "when I do some SAX-parsing (similar to the
SAX2COUNT-sample)"... I was under the impression that you were using some
sort of a content handler to implement this functionality. I take it that
in the interests of testing, you have removed the handler so as to establish
a simplest-case environment?
Perhaps you could try creating a new MFC AppWizard EXE application. In the
app class' InitInstance(), add a call to XMLPlatformUtils::Initialize(), and
in the ExitInstance(), put a call to XMLPlatformUtils::Terminate(). See if
the memory leaks appear at that point. If so, something fishy is going on.
If not, throw some code in the dialog class' OnOK(). Perhaps you could
create a SAXParser object and just tell it to parse a simple XML file. See
if the memory leaks pop up. Maybe next you could add validation and see
what happens. Try to get it to a point that is very similar to the
situation in which you are seeing the problem. The idea, of course, being
to isolate/determine what portion of the Xerces code these memory leaks
might be coming from. If you are unable to recreate the problem, there may
be an issue with the way that the extension DLL is set up.
These are just some steps I would take. Others probably have
different/better ideas...
Since you are using MFC, maybe you could also check into CMemoryState
(CMemoryStatus?) (you can do the same thing using various constructs in the
C-Runtime...).
Good luck,
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]