summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-02-19 23:42:46 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-02-20 04:26:47 +0100
commitabfe6e9866774aced6fac97e65415fa90107ad9b (patch)
treeb4aa94c4f7c2e6936979dd6d89e9bed8b2257a5e /vcl
parentc92753e39575b4b823ce9df8f10fc8ecb8a9915e (diff)
remove explicit memory management
Change-Id: Id9b02dcb65d21bcdef398188d739a56b11f63d21
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/bitmap3.cxx15
1 files changed, 6 insertions, 9 deletions
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index a4accba5de0f..dbf2174866be 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -24,6 +24,8 @@
#include <vcl/bitmapex.hxx>
#include <vcl/bitmap.hxx>
+#include <boost/scoped_array.hpp>
+
#include <impoct.hxx>
#include <impvect.hxx>
@@ -1299,10 +1301,10 @@ sal_Bool Bitmap::ImplScaleSuper(
BitmapReadAccess* pAcc = AcquireReadAccess();
Bitmap aOutBmp( Size( nDstW, nDstH ), 24 );
BitmapWriteAccess* pWAcc = aOutBmp.AcquireWriteAccess();
- long* pMapIX = new long[ nDstW ];
- long* pMapIY = new long[ nDstH ];
- long* pMapFX = new long[ nDstW ];
- long* pMapFY = new long[ nDstH ];
+ boost::scoped_array<long> pMapIX(new long[ nDstW ]);
+ boost::scoped_array<long> pMapIY(new long[ nDstH ]);
+ boost::scoped_array<long> pMapFX(new long[ nDstW ]);
+ boost::scoped_array<long> pMapFY(new long[ nDstH ]);
long nX, nY, nXDst, nYDst;;
double fTemp;
long nTemp , nTempX, nTempY, nTempFX, nTempFY;
@@ -2070,11 +2072,6 @@ sal_Bool Bitmap::ImplScaleSuper(
bRet = true;
}
- delete[] pMapIX;
- delete[] pMapIY;
- delete[] pMapFX;
- delete[] pMapFY;
-
if(pAcc)
{
ReleaseAccess( pAcc );