summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/impgraph.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-09 17:10:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-10 08:30:21 +0200
commit65e41592a650887c8d00586385119effa54de5fa (patch)
tree4b0f6c7f52159d9cf70c561c815f623d3b57198d /vcl/source/gdi/impgraph.cxx
parentacb7c06ab171d4201842d8183eefeeca2d28c3f5 (diff)
pass SvStream around by std::unique_ptr
and give utl::OStreamWrapper a new constructor so that it knows it is taking ownership of the SvStream, which appears to fix several leaks Change-Id: Idcbcca9b81a4f0345fd8b8c8a2f4e84213686a6b Reviewed-on: https://gerrit.libreoffice.org/57187 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/gdi/impgraph.cxx')
-rw-r--r--vcl/source/gdi/impgraph.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index ff59da4a9f0b..467e130c8738 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -1444,7 +1444,7 @@ bool ImpGraphic::ImplSwapOut()
std::unique_ptr<SvStream> xOStm;
try
{
- xOStm.reset(::utl::UcbStreamHelper::CreateStream( aTmpURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READWRITE | StreamMode::SHARE_DENYWRITE ));
+ xOStm = ::utl::UcbStreamHelper::CreateStream( aTmpURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::READWRITE | StreamMode::SHARE_DENYWRITE );
}
catch( const css::uno::Exception& )
{
@@ -1571,7 +1571,7 @@ bool ImpGraphic::ImplSwapIn()
std::unique_ptr<SvStream> xIStm;
try
{
- xIStm.reset(::utl::UcbStreamHelper::CreateStream( aSwapURL, StreamMode::READWRITE | StreamMode::SHARE_DENYWRITE ));
+ xIStm = ::utl::UcbStreamHelper::CreateStream( aSwapURL, StreamMode::READWRITE | StreamMode::SHARE_DENYWRITE );
}
catch( const css::uno::Exception& )
{