summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/inc/win/saldata.hxx6
-rw-r--r--vcl/win/gdi/salgdi.cxx18
2 files changed, 12 insertions, 12 deletions
diff --git a/vcl/inc/win/saldata.hxx b/vcl/inc/win/saldata.hxx
index 3145688e24be..2d20903d6157 100644
--- a/vcl/inc/win/saldata.hxx
+++ b/vcl/inc/win/saldata.hxx
@@ -86,9 +86,9 @@ public:
HGLOBAL mhDitherDIB; // dither memory handle
BYTE* mpDitherDIB; // dither memory
BYTE* mpDitherDIBData; // beginning of DIB data
- tools::Long* mpDitherDiff; // Dither mapping table
- BYTE* mpDitherLow; // Dither mapping table
- BYTE* mpDitherHigh; // Dither mapping table
+ std::unique_ptr<tools::Long[]> mpDitherDiff; // Dither mapping table
+ std::unique_ptr<BYTE[]> mpDitherLow; // Dither mapping table
+ std::unique_ptr<BYTE[]> mpDitherHigh; // Dither mapping table
HHOOK mhSalObjMsgHook; // hook to get interesting msg for SalObject
HWND mhWantLeaveMsg; // window handle, that want a MOUSELEAVE message
AutoTimer* mpMouseLeaveTimer; // Timer for MouseLeave Test
diff --git a/vcl/win/gdi/salgdi.cxx b/vcl/win/gdi/salgdi.cxx
index 630933192687..8a38a684ca35 100644
--- a/vcl/win/gdi/salgdi.cxx
+++ b/vcl/win/gdi/salgdi.cxx
@@ -180,9 +180,9 @@ void ImplInitSalGDI()
pSalData->mhDitherDIB = GlobalAlloc( GMEM_FIXED, sizeof( BITMAPINFOHEADER ) + 192 );
pSalData->mpDitherDIB = static_cast<BYTE*>(GlobalLock( pSalData->mhDitherDIB ));
- pSalData->mpDitherDiff = new tools::Long[ 256 ];
- pSalData->mpDitherLow = new BYTE[ 256 ];
- pSalData->mpDitherHigh = new BYTE[ 256 ];
+ pSalData->mpDitherDiff.reset(new tools::Long[ 256 ]);
+ pSalData->mpDitherLow.reset(new BYTE[ 256 ]);
+ pSalData->mpDitherHigh.reset(new BYTE[ 256 ]);
pSalData->mpDitherDIBData = pSalData->mpDitherDIB + sizeof( BITMAPINFOHEADER );
memset( pSalData->mpDitherDIB, 0, sizeof( BITMAPINFOHEADER ) );
@@ -254,9 +254,9 @@ void ImplInitSalGDI()
pSalData->mhDitherDIB = GlobalAlloc( GMEM_FIXED, nSize );
pSalData->mpDitherDIB = static_cast<BYTE*>(GlobalLock( pSalData->mhDitherDIB ));
- pSalData->mpDitherDiff = new tools::Long[ 256 ];
- pSalData->mpDitherLow = new BYTE[ 256 ];
- pSalData->mpDitherHigh = new BYTE[ 256 ];
+ pSalData->mpDitherDiff.reset(new tools::Long[ 256 ]);
+ pSalData->mpDitherLow.reset(new BYTE[ 256 ]);
+ pSalData->mpDitherHigh.reset(new BYTE[ 256 ]);
pSalData->mpDitherDIBData = pSalData->mpDitherDIB + sizeof( BITMAPINFOHEADER ) + ( 256 * sizeof( short ) );
memset( pSalData->mpDitherDIB, 0, sizeof( BITMAPINFOHEADER ) );
@@ -333,9 +333,9 @@ void ImplFreeSalGDI()
GlobalUnlock( pSalData->mhDitherDIB );
GlobalFree( pSalData->mhDitherDIB );
pSalData->mhDitherDIB = nullptr;
- delete[] pSalData->mpDitherDiff;
- delete[] pSalData->mpDitherLow;
- delete[] pSalData->mpDitherHigh;
+ pSalData->mpDitherDiff.reset();
+ pSalData->mpDitherLow.reset();
+ pSalData->mpDitherHigh.reset();
}
DeleteSysColorList();