Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


Hi Dennis,

On Fri, 2015-08-28 at 09:28 +0530, Dennis Francis wrote:
I tried calling disposeAndClear() on mpWindow but the object remains
intact with a lower mnRefCnt of 207. After putting address of
mnRefCount on gdb watch,

        Heh =)

it was clear that ref counts gets added for each font added to the
font list box widget while calling the constructor of
ImplFontListFontInfo.
In ImplFontListFontInfo the OutputDevice is held inside VclPtr wrapper
(mpDevice) which is never released.

        Right. So - what we need to do is to add code to the 'dispose' method
of whatever is holding these handles to clear the references. The root
problem is that the widget holding those is not clearing up its own
references properly in dispose.

        So - there is some deepish nesting here AFAICS - all of which needs
some simple cleanup methods.

        ImplFontListFontInfo needs a dispose method that does:
                mpDevice.clear();

        ImplFontListNameInfo needs a dispose method that walks its
                list of ImplFontListFontInfo (via mpFirst I guess)
                calling dispose() on those.

        FontList needs a dispose method
                disposing each of its ptr_vector members
                also 'clear()' ing each of it's mpDev, mpDev2 members

        And we of course need to dispose the FontList whereever it is
instantiated in a widget: eventually we'll have to hit a 'dispose'
method going up the tree.

        Is that feasible ?

        Thanks so much for chasing this one Dennis !

        ATB,

                Michael.

-- 
 michael.meeks@collabora.com  <><, Pseudo Engineer, itinerant idiot


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.