1.

Is It Ok To Call The Xmlplatformutils::initialize/terminate Pair Of Routines Multiple Times In One Program?

Answer»

Yes. Note, however, that the application NEEDS to guarantee that the XMLPlatformUtils::Initialize() and XMLPlatformUtils::Terminate() methods are CALLED from the same thread (usually the initial thread executing main()) or proper synchronization is performed by the application if multiple threads call XMLPlatformUtils::Initialize() and XMLPlatformUtils::Terminate() concurrently.

If you are calling XMLPlatformUtils::Initialize() a number of times, and then follow with XMLPlatformUtils::Terminate() the same number of times, only the first XMLPlatformUtils::Initialize() will do the INITIALIZATION, and only the last XMLPlatformUtils::Terminate() will clean up the MEMORY. The other calls are ignored.

Yes. Note, however, that the application needs to guarantee that the XMLPlatformUtils::Initialize() and XMLPlatformUtils::Terminate() methods are called from the same thread (usually the initial thread executing main()) or proper synchronization is performed by the application if multiple threads call XMLPlatformUtils::Initialize() and XMLPlatformUtils::Terminate() concurrently.

If you are calling XMLPlatformUtils::Initialize() a number of times, and then follow with XMLPlatformUtils::Terminate() the same number of times, only the first XMLPlatformUtils::Initialize() will do the initialization, and only the last XMLPlatformUtils::Terminate() will clean up the memory. The other calls are ignored.



Discussion

No Comment Found