stack-allocated Window subclasses
michael.meeks at collabora.com
Tue Sep 23 05:40:36 PDT 2014
On Tue, 2014-09-23 at 10:01 +0200, Noel Grandin wrote:
> I ran my clang plugin over master last night. This is the output.
Awesome - I've up-loaded a log here:
> so there is a fair amount of work involved :-)
Heh =) sure, it doesn't look -terribly- bad though, I think each
call-site is a reasonably small change.
> So the work is restricted to a reasonable number of files.
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 =)
michael.meeks at collabora.com <><, Pseudo Engineer, itinerant idiot
More information about the LibreOffice