https://bugs.documentfoundation.org/show_bug.cgi?id=97527
Bug ID: 97527 Summary: vcl: reference-count Menu ... Product: LibreOffice Version: 5.1.0.1 rc Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: medium Component: graphics stack Assignee: libreoffice-bugs@lists.freedesktop.org Reporter: michael.me...@collabora.com We have a nice VclPtr<> template for reference counting the odd vcl/ types that we have around the place. However it currently is only good for counting OutputDevice derivatives. That is a shame - we really need to do the same conversion of delete -> dispose, and handling references properly for a number of other types both internal (in vcl/ backends) and external. To do that we need to split the VclPtr pieces out of OutDev into another base-class; say: "VclReferenceBase" or something (?) - you'll see the acquire, delete, mutable mnRef also these guys: protected: /// release all references to other objects. virtual void dispose(); public: /// call the dispose() method if we have not already been disposed. void disposeOnce(); bool isDisposed() const { return mbDisposed; } So - step #1 is to factor that out into a nice base-class and inherit 'OutputDevice' from that - then re-run 'make check' etc. ;-) Step #2 of this - is to then convert the next class to use that; a good target might be: Menu so: class VCL_DLLPUBLIC Menu : public ::VclReferenceBase, public Resource or somesuch - and then switch all Menu instances on the stack, or as members into VclPtr< Menu >'s - and ... well everything do as for the VclPtr<> cleanup - but for Menu classes =) Hopefully then we can move onto the internal structures in VCL too. Thanks ! =) -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs