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 John Snelson <jo...@oracle.com> on 2009/01/13 15:41:46 UTC

MemoryManager bug in XMLMutex

Hi everyone,

We've just found a bug in XMLMutex that probably needs fixing. The 
constructor takes a MemoryManager* to use to create the mutex. However, 
when the mutex is released the default memory manager is used, not the 
one passed into the constructor.

I propose that we change XMLMutex to store the MemoryManager it was 
created with, and use that in it's destructor to release it's mutex.

Any opinions?

John

-- 
John Snelson, Oracle Corporation            http://snelson.org.uk/john
Berkeley DB XML:            http://oracle.com/database/berkeley-db/xml
XQilla:                                  http://xqilla.sourceforge.net

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: MemoryManager bug in XMLMutex

Posted by John Snelson <jo...@oracle.com>.
Boris Kolpackov wrote:
> John Snelson <jo...@oracle.com> writes:
> 
>> I propose that we change XMLMutex to store the MemoryManager it was 
>> created with, and use that in it's destructor to release it's mutex.
> 
> Yes, that sounds like the right thing to do. If you are making the
> change, can you commit it to both the trunk and the xerces-3.0 branch
> so that we have this fixed if we release 3.0.1?

Sure, no problem.

John

-- 
John Snelson, Oracle Corporation            http://snelson.org.uk/john
Berkeley DB XML:            http://oracle.com/database/berkeley-db/xml
XQilla:                                  http://xqilla.sourceforge.net

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: MemoryManager bug in XMLMutex

Posted by Boris Kolpackov <bo...@codesynthesis.com>.
Hi John,

John Snelson <jo...@oracle.com> writes:

> I propose that we change XMLMutex to store the MemoryManager it was 
> created with, and use that in it's destructor to release it's mutex.

Yes, that sounds like the right thing to do. If you are making the
change, can you commit it to both the trunk and the xerces-3.0 branch
so that we have this fixed if we release 3.0.1?

Boris

-- 
Boris Kolpackov, Code Synthesis Tools   http://codesynthesis.com/~boris/blog
Open source XML data binding for C++:   http://codesynthesis.com/products/xsd
Mobile/embedded validating XML parsing: http://codesynthesis.com/products/xsde

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org