summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-03 16:19:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-04 08:35:13 +0200
commit2ddddc46fdc3cf18cefcca29934eaab0544d2198 (patch)
treee79a7be6c614ed564ab7ebd13f948d28f738f015 /drawinglayer
parentb0b4649690983143d88a4fae3c49f46ba2db3c51 (diff)
Make ThreadPool::pushTask take param by std::unique_ptr
And fix leak in XclExpRowBuffer::Finalize, was not freeing the synchronous task it creates Change-Id: Id1e9ddb5d968e6b95d9d2b5ca0c9e50774580182 Reviewed-on: https://gerrit.libreoffice.org/56874 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/primitive2d/sceneprimitive2d.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
index 35024d9bc684..0249bd7a48ac 100644
--- a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
@@ -424,8 +424,8 @@ namespace drawinglayer
aBZPixelRaster,
nLinesPerThread * a,
a + 1 == nThreadCount ? aBZPixelRaster.getHeight() : nLinesPerThread * (a + 1)));
- Executor* pExecutor = new Executor(aTag, std::move(pNewZBufferProcessor3D), getChildren3D());
- rThreadPool.pushTask(pExecutor);
+ std::unique_ptr<Executor> pExecutor(new Executor(aTag, std::move(pNewZBufferProcessor3D), getChildren3D()));
+ rThreadPool.pushTask(std::move(pExecutor));
}
rThreadPool.waitUntilDone(aTag);