diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-03-17 20:19:40 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-10 11:51:01 +0100 |
commit | 256371f49dad16347db48d7ff826779345538f3c (patch) | |
tree | 3d3ab224e8434c16f95c4670ed5bc34a4e9f05f3 /cui/source/factory | |
parent | a140e0d0bab3bd09fe19711fc99e411fcc2675d7 (diff) |
clear() is the equivalent of assigning a local ptr to NULL.
Sometimes it matters; doing a disposeAndClear() instead can change
the order of destruction profoundly. Fix a number of issues from:
"vclwidget: change all vcl::window fields to be wrapped in VclPtr"
Change-Id: I3127d3ed973458e8299156453258e167dbdb8ccf
Diffstat (limited to 'cui/source/factory')
-rw-r--r-- | cui/source/factory/dlgfact.cxx | 5 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.hxx | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 1210b8afd6df..a540534702ab 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -105,9 +105,11 @@ IMPL_ABSTDLG_BASE(AbstractFmShowColsDialog_Impl); IMPL_ABSTDLG_BASE(AbstractHyphenWordDialog_Impl) IMPL_ABSTDLG_BASE(AbstractThesaurusDialog_Impl) -AbstractSvxZoomDialog_Impl::~AbstractSvxZoomDialog_Impl() \ +AbstractSvxZoomDialog_Impl::~AbstractSvxZoomDialog_Impl() { + pDlg.disposeAndClear(); } + short AbstractSvxZoomDialog_Impl::Execute() { return pDlg->Execute(); @@ -153,6 +155,7 @@ IMPL_ABSTDLG_BASE(AbstractPasswordToOpenModifyDialog_Impl); // virtual VclAbstractDialog2_Impl::~VclAbstractDialog2_Impl() { + m_pDlg.disposeAndClear(); } // virtual diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index d356bbab2181..98833f9a70be 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -72,8 +72,9 @@ public: \ #define IMPL_ABSTDLG_BASE(Class) \ Class::~Class() \ { \ + pDlg.disposeAndClear(); \ } \ -short Class::Execute() \ +short Class::Execute() \ { \ return pDlg->Execute(); \ } |