xerces-c-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Collyer <scoll...@netspinner.co.uk>
Subject Re: Valgrind "possible" memory leaks in xercesc_2_7::SAX2XMLReaderImpl::parse
Date Thu, 03 Jul 2008 07:56:21 GMT
David Bertoni wrote:
> Stephen Collyer wrote:
>> David Bertoni wrote:
>>
>>> Are you calling XMLPlatformUtils::Terminate() before your application
>>> exits?
>>>
>>> Dave
>>
>> No. My app. doesn't in fact terminate, however - it's a server.
>> I've done a bit more investigation, and AFAICS, there's no leak,
>> after having run several transaction through the system.
> It never terminates?  That's quite a server... ;-)

Yeah, well, I write good code :-)

It never terminates until terminated explicitly, and the important
matter is that it shouldn't leak on each parse. It doesn't, so I'm
happy.

>>
>> I'm guessing that this memory is allocated at Xerces initialization
>> time, and would be released if I terminated it correctly ? If so,
>> I'll do that, though it's not really a problem for me if that is
>> the case.
> Exactly.  If you don't want false positives from leak-detection
> software, you need to call XMLPlatformUtils::Terminate().

Right. I really ought to wrap this up in some kind of RAII thing ...

-- 
Regards

Steve Collyer
Netspinner Ltd

Mime
View raw message