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 _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice