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 Olivier Schmitt <sc...@metaintegration.net> on 2001/03/14 23:32:02 UTC

XMLPlatformUtils::Terminate() on Windows platform

Hi everyone,

I am working on a Windows project that uses the Xerces c++ DOM parser to
parse xml files.
Here is the architecture of the software :
- the executable calls several "connector" dlls
- each "connector" dll can parse an input xml file or generate an xml output
file.
  in order to do so, the input "connectors" create DOMparsers and therefore
  load and initialize the Xerces dll before creating the parsers.
  the output "connectors" build trees and therefore just have to initialize
the xerces platform
The application can do data movement from xml sources to xml destination
files.
The data movement can be done several times within the same process.
Between two data movement sessions, the executable may or may not unload
the "connectors" and xerces dlls.

We have been experiencing trouble with the XMLPlatformUtils::Initialize()
and
XMLPlatformUtils::Terminate() methods.
Basically, we initialize the platform each time a connector is
started/restarted
and we never terminate the platform (from the connector code) because
maybe a future data movement will use xerces again and we know
we cannot restart the parser once it has been stopped.

But what we know for sure is that we can terminate the platform and release
the memory when the dll is unloaded.
So did you guys thought about calling XMLPlatformUtils::Terminate()
in the DllMain() function of the Xerces dll which is executed when the dll
is unloaded ?
What do you think of this idea ?
Or do you plan to fix the Initialize/Terminate bug soon ?

Oliver


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