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 Brendan Reville <br...@tenzing.com> on 2000/11/08 20:03:30 UTC
calling Initialize multiple times
hi all,
Is it OK to call the XMLPlatformUtils::Initialize/Terminate pair of routines
multiple times in the one program?
And is there much overhead in doing this?
thanks
- Brendan
Re: calling Initialize multiple times
Posted by Khaled Noaman <kn...@jtcsv.com>.
You should call XMLPlatformUtils::Initialize only once at the start of the
program,
and XMLPlatformUtils::Terminate at the end of the program.
Khaled Noaman
IBM Toronto Lab, XML Parsers
knoaman@ca.ibm.com
Brendan Reville wrote:
> hi all,
>
> Is it OK to call the XMLPlatformUtils::Initialize/Terminate pair of routines
> multiple times in the one program?
>
> And is there much overhead in doing this?
>
> thanks
>
> - Brendan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: calling Initialize multiple times
Posted by Dean Roddey <dr...@charmedquark.com>.
No, its not ok to do that at this time. You can can away with multiple
Inits, since it will just ignore subsequent ones after the first. But don't
call terminate until the end of the program. Actually, you don't really have
to call it at all. Its primary reason for existence is to make folks happy
who want to check for leaks and such.
--------------------------
Dean Roddey
The CIDLib C++ Frameworks
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com
"It takes two buttocks to make friction"
- African Proverb
----- Original Message -----
From: "Brendan Reville" <br...@tenzing.com>
To: <xe...@xml.apache.org>
Sent: Wednesday, November 08, 2000 11:03 AM
Subject: calling Initialize multiple times
>
> hi all,
>
> Is it OK to call the XMLPlatformUtils::Initialize/Terminate pair of
routines
> multiple times in the one program?
>
> And is there much overhead in doing this?
>
> thanks
>
> - Brendan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
RE: calling Initialize multiple times
Posted by Joe Pruitt <j....@f5.com>.
This has been addressed many times in this list. You can call Initialize/Terminate multiple times if you want to, but only if you
want your application to crash. The second call to Terminate will cause a null pointer access...
I've got a custom fix that keeps a reference count around the Init/Term calls to enable multiple calls, but for some reason the dev
team wants to only support calling this pair once per process.
-Joe
> -----Original Message-----
> From: Brendan Reville [mailto:brendan.reville@tenzing.com]
> Sent: Wednesday, November 08, 2000 11:04 AM
> To: xerces-c-dev@xml.apache.org
> Subject: calling Initialize multiple times
>
>
>
> hi all,
>
> Is it OK to call the XMLPlatformUtils::Initialize/Terminate pair of routines
> multiple times in the one program?
>
> And is there much overhead in doing this?
>
> thanks
>
> - Brendan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org