diff options
-rw-r--r-- | include/vcl/dockingarea.hxx | 3 | ||||
-rw-r--r-- | vcl/source/window/dockingarea.cxx | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/include/vcl/dockingarea.hxx b/include/vcl/dockingarea.hxx index 2a178f530e5d..6f6e045c1451 100644 --- a/include/vcl/dockingarea.hxx +++ b/include/vcl/dockingarea.hxx @@ -21,6 +21,7 @@ #define INCLUDED_VCL_DOCKINGAREA_HXX #include <vcl/window.hxx> +#include <memory> // A simple container for docked toolbars // - its main purpose is theming support @@ -29,7 +30,7 @@ class VCL_DLLPUBLIC DockingAreaWindow : public vcl::Window class ImplData; private: - ImplData* mpImplData; + std::unique_ptr<ImplData> mpImplData; DockingAreaWindow (const DockingAreaWindow &) = delete; DockingAreaWindow & operator= (const DockingAreaWindow &) = delete; diff --git a/vcl/source/window/dockingarea.cxx b/vcl/source/window/dockingarea.cxx index 4d01b3625e0c..647f87bf3d36 100644 --- a/vcl/source/window/dockingarea.cxx +++ b/vcl/source/window/dockingarea.cxx @@ -44,7 +44,7 @@ DockingAreaWindow::DockingAreaWindow( vcl::Window* pParent ) : { ImplInit( pParent, WB_CLIPCHILDREN|WB_3DLOOK, nullptr ); - mpImplData = new ImplData; + mpImplData.reset(new ImplData); } DockingAreaWindow::~DockingAreaWindow() @@ -54,7 +54,7 @@ DockingAreaWindow::~DockingAreaWindow() void DockingAreaWindow::dispose() { - delete mpImplData; + mpImplData.reset(); Window::dispose(); } |