Re: [xml] calling xmlCleanupParser from a library considered harmful
- From: Alex Bligh <alex alex org uk>
- To: veillard redhat com
- Cc: xml gnome org, Michael Stahl <mstahl redhat com>
- Subject: Re: [xml] calling xmlCleanupParser from a library considered harmful
- Date: Tue, 30 Oct 2012 07:12:41 +0000
On 30 Oct 2012, at 02:07, Daniel Veillard wrote:
Opinions about this ?
One issue is that for library authors there is no safe way of making your library not introduce reported
valgrind leakage into the calling program.
Could you add 1 to a counter on xmlInit() and decrement it on xmlCleanupParser(), and only do anything if
xmlCleanupParser hits zero.
I think this is safe in that all you'd do is memory leak if the app or the library didn't pair their
statements. You could have a xmlImNotALibrarySoForceCleanupParser() or similar for the main program.
--
Alex Bligh
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]