Hello,

So initializing and terminating the xerces-c library could result in a failure? 
 I do this in our source as well, and I don't think we've ever had a problem, 
but am concerned about whether this could result in a very hard-to-find error 
in the future.

Also, does each module need to call initialize/terminate on the xerces-c 
library?  We dynamically load DLLs that use Xerces internally, so any guidance 
would be helpful.

Thanks,
Nicholas

-----Original Message-----
From: David Bertoni [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 10, 2008 7:42 PM
To: [email protected]
Subject: Re: MemBufInputSource Core Dump

[EMAIL PROTECTED] wrote:
> David ,  thank you for your suggestion
> 
> 1. In now I already fix my parse function
> 2. I found the Xercesc-C doc ,
>     XMLPlatformUtils::Initialize() and XMLPlatformUtils::Terminate()
>    can use it in after function start and before function end
> 3. In your suggestion , told me 「Please make sure you're not initializing
> and terminating Xerces-C ineach thread 」
>   It's mean in multi-thread env only have once Initialize and Terminate  ?
Yes.  You should initialize the library once before you start processing
and terminate once when you're done.

The initialization code is not thread-safe, and initializing and
terminating the library multiple times is very inefficient.

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to