summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/toolkit/awt/vclxwindow.hxx3
-rw-r--r--toolkit/source/awt/vclxwindow.cxx4
2 files changed, 4 insertions, 3 deletions
diff --git a/include/toolkit/awt/vclxwindow.hxx b/include/toolkit/awt/vclxwindow.hxx
index 18cd3f0392ca..27be3e102d32 100644
--- a/include/toolkit/awt/vclxwindow.hxx
+++ b/include/toolkit/awt/vclxwindow.hxx
@@ -44,6 +44,7 @@
#include <tools/link.hxx>
#include <stdarg.h>
+#include <memory>
#include <vector>
#include <functional>
@@ -76,7 +77,7 @@ typedef cppu::ImplInheritanceHelper< VCLXDevice,
class TOOLKIT_DLLPUBLIC VCLXWindow : public VCLXWindow_Base
{
private:
- VCLXWindowImpl* mpImpl;
+ std::unique_ptr<VCLXWindowImpl> mpImpl;
UnoPropertyArrayHelper *GetPropHelper();
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 6142b15140a3..7d1a70a23515 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -328,12 +328,12 @@ void ImplInitWindowEvent( css::awt::WindowEvent& rEvent, vcl::Window const * pWi
VCLXWindow::VCLXWindow( bool _bWithDefaultProps )
:mpImpl( nullptr )
{
- mpImpl = new VCLXWindowImpl( *this, _bWithDefaultProps );
+ mpImpl.reset( new VCLXWindowImpl( *this, _bWithDefaultProps ) );
}
VCLXWindow::~VCLXWindow()
{
- delete mpImpl;
+ mpImpl.reset();
if ( GetWindow() )
{