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


On Tuesday 23 of September 2014, Michael Meeks wrote:
      The question is; what should we replace it with. Personally I'm more of
a fan of intrusive reference counting for VCL - we don't want lots of
atomics, so that the optimizer can rid us of size inefficiency - and at
least for now we can't ref-count those guys anyway I think.

      Then again rtl::Reference<Foo> lost its nasty virtual methods recently
(IIRC), so - perhaps we could use that - but for the fact that it's
unpleasantly long to type. I'd also love to avoid 'orrible casts
everywhere when converting to references to parent types [ perhaps I
just do this wrong myself ;-]

      So - possibly having a ButtonRef xFoo; type class that is (underneath)
an rtl::Reference<Button> - and yet can easily be implicitly co-erced to
a WindowRef etc. might fly ?

      I guess we need to have a plan in-place there before shunting all those
widgets off onto the heap where we can lifecycle manage them sensibly =)

      Thoughts ?

 I must have missed it, where can I read what problems led to requiring a 
solution like this instead of the primitive&working way of having parents 
responsible for cleaning up their children on destruction? Stack-allocated 
objects is probably the most sensible C++ lifecycle management ever, so if it 
doesn't work with vcl, vcl has got to be seriously broken in that regard.


-- 
 Lubos Lunak
 l.lunak@collabora.com

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.