incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 113608] animations: All animation nodes are leaked
Date Fri, 15 Jun 2012 08:03:45 GMT
https://issues.apache.org/ooo/show_bug.cgi?id=113608

--- Comment #9 from Andre <af@a-w-f.de> ---
You found the root cause for mpImpl being NULL.  Very good.

If you replace the lines

    uno::Reference< uno::XInterface > xShape( maWeakUnoShape );  // zhangjf
    if (!xShape.is()&& mpSvxShape)                               // zhangjf
        return NULL;                                         // zhangjf

    return mpSvxShape;

with

    if (mpSvxShape!=NULL && maWeakUnoShape.get() == NULL)
        return NULL;
    else
        return mpSvxShape;

then the whole thing becomes even clearer and a little faster (no type
conversion of xShape).

Maybe it would be even better to remove the const attribute from the
getSvxShape() method and set mpSvxShape to NULL when the weak pointer is gone. 
This might prevent errors in other scenarios.
What do you think?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Mime
View raw message