Williamson,

      Yes, that tmpMutex shall be registered so that XMLPlatformUtil::terminate() can release it.

      Would you please report the bug to bugzilla so that its status can be traced, thanks.

Rgds,
PeiYong
 

"Williamson, Siehnai" wrote:

 

Hi Everyone,

There appears to be a memory leak in the SAX parser during validation.  It occurs at the line XMLMutex* tmpMutex = new XMLMutex in the gVAlidatorMutex() method of the XMLValidator class (see below):

*****

static XMLMutex& gValidatorMutex()
{
    static XMLMutex* validatorMutex = 0;
    if (!validatorMutex)
    {
        XMLMutex* tmpMutex = new XMLMutex;
        if (XMLPlatformUtils::compareAndSwap((void**)&validatorMutex, tmpMutex, 0))
        {
            // Someone beat us to it, so let's clean up ours
            delete tmpMutex;
        }
    }
    return *validatorMutex;
}

*****

tmpMutex appears to never have been deleted if XMLPlatformUtils::compareAndSwap((void**)&validatorMutex, tmpMutex, 0) returns 0.  If it is deleted by XMLPlatformUtils, I don't see it.  Please help.
 

Siehnai Williamson
DocuCorp International, Inc.
Tel:  (214) 891-6401

Reply via email to