summaryrefslogtreecommitdiff
path: root/embeddedobj/source/inc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-01-12 16:53:38 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-01-13 08:04:49 +0100
commit13ca560d136e833efabef843c57771c96d865964 (patch)
treeb6002d5e5e382c0a62bb67d4f2c30111d1df4268 /embeddedobj/source/inc
parent55a754cca0f299b658d99684caa9e15cbdd90cc6 (diff)
Fix memory leak
Change-Id: I82ce013a42ac1cd9bb4f3842e9fba8fbc6056b3c
Diffstat (limited to 'embeddedobj/source/inc')
-rw-r--r--embeddedobj/source/inc/dummyobject.hxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/embeddedobj/source/inc/dummyobject.hxx b/embeddedobj/source/inc/dummyobject.hxx
index 1a0739c43dee..2587bcc6f89f 100644
--- a/embeddedobj/source/inc/dummyobject.hxx
+++ b/embeddedobj/source/inc/dummyobject.hxx
@@ -20,12 +20,17 @@
#ifndef INCLUDED_EMBEDDEDOBJ_SOURCE_INC_DUMMYOBJECT_HXX
#define INCLUDED_EMBEDDEDOBJ_SOURCE_INC_DUMMYOBJECT_HXX
+#include <sal/config.h>
+
+#include <memory>
+
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <com/sun/star/embed/XEmbedPersist.hpp>
#include <cppuhelper/implbase.hxx>
+#include <cppuhelper/interfacecontainer.hxx>
namespace com { namespace sun { namespace star {
namespace embed {
@@ -49,7 +54,8 @@ class ODummyEmbeddedObject : public ::cppu::WeakImplHelper
, css::embed::XEmbedPersist >
{
::osl::Mutex m_aMutex;
- ::cppu::OMultiTypeInterfaceContainerHelper* m_pInterfaceContainer;
+ std::unique_ptr<cppu::OMultiTypeInterfaceContainerHelper>
+ m_pInterfaceContainer;
bool m_bDisposed;
OUString m_aEntryName;
@@ -75,8 +81,7 @@ protected:
public:
ODummyEmbeddedObject()
- : m_pInterfaceContainer( nullptr )
- , m_bDisposed( false )
+ : m_bDisposed( false )
, m_nObjectState( -1 )
, m_nCachedAspect( 0 )
, m_bHasCachedSize( false )