diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2017-03-09 03:20:19 +0100 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@canonical.com> | 2017-03-10 13:00:49 +0000 |
commit | c54bb4a9f76a11561a7f4010382dbe46c0d2ef2a (patch) | |
tree | 2339cfad20a154da33d49bc55b148e99ce8096b6 /include/editeng/eerdll.hxx | |
parent | 1a044b25c279236d9f67847ec6ad426d8c5aac13 (diff) |
tdf#99352: create editeng::SharedVclRessources
- instead of keeping vcl resources in a rtl::Static
- these are shared owned by all EditEngines
- they let go of them when disposed
- thus, this should prevent VclPtrs to leak beyond dispose()
Change-Id: Ic6198c19d0ff9c09ecdea377d07807f08711d6a0
Reviewed-on: https://gerrit.libreoffice.org/34986
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'include/editeng/eerdll.hxx')
-rw-r--r-- | include/editeng/eerdll.hxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/editeng/eerdll.hxx b/include/editeng/eerdll.hxx index 74034f249bd3..928f5603f96a 100644 --- a/include/editeng/eerdll.hxx +++ b/include/editeng/eerdll.hxx @@ -21,6 +21,10 @@ #define INCLUDED_EDITENG_EERDLL_HXX class GlobalEditData; +namespace editeng +{ + class SharedVclResources; +} #include <tools/resid.hxx> #include <editeng/editengdllapi.h> @@ -35,6 +39,7 @@ public: class EditDLL { std::unique_ptr<GlobalEditData> pGlobalData; + std::weak_ptr<editeng::SharedVclResources> pSharedVcl; public: EditDLL(); @@ -42,6 +47,7 @@ public: static ResMgr* GetResMgr(); GlobalEditData* GetGlobalData() const { return pGlobalData.get(); } + std::shared_ptr<editeng::SharedVclResources> GetSharedVclResources(); static EditDLL& Get(); }; |