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


On Fri, 2012-04-20 at 12:39 +0200, Michael Stahl wrote:

I'm working on removing SvRefBase from SvParser to make its life cycle
a little more easier to understand.  I've checked the call sites of
all of its derived classes, and in most of those call sites, we could
easily replace it with scoped_ptr.  The only exception is the
SwHTMLParser, where its use involves asynchronous call to parse HTML
input.  This makes a bit non-trivial to manage its life cycle.

would wrapping a shared_ptr around it work?

Well, it might work, but not without untangling the ref-count
manipulation that SvParser does during the anync call.

http://opengrok.libreoffice.org/xref/core/svtools/source/svrtf/svparser.cxx#596

I haven't wrapped my head around the logic behind these ref-count
changes here, so I'm not 100% sure...

Kohei

-- 
Kohei Yoshida, LibreOffice hacker, Calc


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.