summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/svx/svdetc.hxx3
-rw-r--r--svx/source/svdraw/svdetc.cxx3
2 files changed, 3 insertions, 3 deletions
diff --git a/include/svx/svdetc.hxx b/include/svx/svdetc.hxx
index ef62a825245a..20d37c3c6d4f 100644
--- a/include/svx/svdetc.hxx
+++ b/include/svx/svdetc.hxx
@@ -27,6 +27,7 @@
#include <tools/fract.hxx>
#include <vcl/outdev.hxx>
#include <svx/svdobj.hxx>
+#include <memory>
/**
@@ -162,7 +163,7 @@ class OLEObjCache
std::vector<SdrOle2Obj*> maObjs;
size_t nSize;
- AutoTimer* pTimer;
+ std::unique_ptr<AutoTimer> pTimer;
static bool UnloadObj( SdrOle2Obj* pObj );
DECL_LINK( UnloadCheckHdl, Timer*, void );
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index aa92b123be97..3c6924affdc4 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -108,7 +108,7 @@ OLEObjCache::OLEObjCache()
nSize = officecfg::Office::Common::Cache::DrawingEngine::OLE_Objects::get();
else
nSize = 100;
- pTimer = new AutoTimer( "svx OLEObjCache pTimer UnloadCheck" );
+ pTimer.reset( new AutoTimer( "svx OLEObjCache pTimer UnloadCheck" ) );
pTimer->SetInvokeHandler( LINK(this, OLEObjCache, UnloadCheckHdl) );
pTimer->SetTimeout(20000);
pTimer->SetStatic();
@@ -117,7 +117,6 @@ OLEObjCache::OLEObjCache()
OLEObjCache::~OLEObjCache()
{
pTimer->Stop();
- delete pTimer;
}
IMPL_LINK_NOARG(OLEObjCache, UnloadCheckHdl, Timer*, void)