[xsd-users] (Windows) mixing debug/release Xerces lib

Greg Carter greg at permedia.ca
Tue Feb 24 12:06:12 EST 2009


Boris Kolpackov wrote:
> Hi Greg,
>   
> Is any of the components in your application linking to the static
> VC++ runtime? If they all use DLL runtimes and, as you said, memory
> allocation does not cross plugin boundaries, then this shouldn't
> be a problem.
>   
> In the default configuration (XSD_USE_LCP is not defined), XSD-
> generated code does not call any Xerces-C++ code that allocates and
> returns strings. When XSD_USE_LCP is defined, XMLString::transcode
> is called but then we pass a memory manager to make sure that
> allocation and deallocation happens on the same heap. This memory
> manager is also used in the call to Base64::decode which allocates
> a byte array.
>
>   
They all use dll runtimes. Since the problem went away after switching 
the xerces lib I figured it must have been in how XSD used it, as the 
only call I make directly to xerces is the initialization call 
(XMLPlatformUtils::Initialize).  However it sounds like XSD is doing all 
the right things.  Must be something else that is causing the problem.  
It occurs somewhere in DOMImplementation* impl 
(DOMImplementationRegistry::getDOMImplementation (ls_id));  I'll look 
into it more when I have some time to figure out the exact cause.  Thanks.




More information about the xsd-users mailing list