Hi Alex, You are correct. Xerces will leak if the DLL is dynamically loaded, unloaded, and loaded again. As Dean notes in his earlier reply, he has added a termination method and a hook by which this kind of storage can be recovered.
An example of use of the new mechanism for registering an object for deletion at termination is in the file src/internal/XMLScanner, at line 197. The application code triggers the termination cleanup by calling XMLPlatformUtils::Terminate() just before unloading the Xerces DLL. As Dean noted, not all of the lazily allocated storage is currently set up to use this mechanism - actually, most of it doesn't yet. We will be getting to this over time, but if you would like to speed things along, I'll be more than happy to put any patches for this back into CVS. Best regards, -- Andy From: "Alex Matevossian" <[EMAIL PROTECTED]> > This is a follow-up to the email sent 2 days ago by Steve Chuang re memory > leaks in Xerces. > > Summary > Xerces DLL allocates memory on the heap during initialization. Since the > memory is not cleaned automatically by the DLL and the DLL provides no > mechanism to release the memory explicitly, the memory will be released only > when the process hosting the DLL terminates. > > This creates memory leaks if the DLL is dynamically loaded and unloaded by > the hosting process. > [Details deleted]