[xml] xmlCleanupParser() question / patch



Hi!

If I use the library in a threaded program and call xmlCleanupParser() I can't reinitialize it.

So here's what happens:

1. xmlCleanupThreads() is called from xmlCleanupParser()
2. the global key is deleted by xmlCleanupParser() which was created by xmlOnceInit()

So the problem is that if I want to clear the data allocated then I can't use the library because it will leak memory (xmlOnceInit will not be called). The simplest way to solve this issue is to reset once_control.

The other way is to remove xmlCleanupThreads() from the cleanup process and let the user/programmer do the dirty work...

Aron Szabo
Pointless Software

Attachment: libxml2_pthread_reinit.patch
Description: Text document



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]