mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-10 17:40:24 +08:00
Foundation classes - Leak of WinAPI resources. (#625)
- Replaces raw IWICBitmapFlipRotator pointer with Image_ComPtr smart pointer wrapper - Updates pointer access patterns to use smart pointer methods (.ChangePtr() and .get()) - Maintains existing functionality while improving resource management
This commit is contained in:
@@ -922,13 +922,13 @@ bool Image_AlienPixMap::Load(const Standard_Byte* theData,
|
||||
aWicSrc = aWicConvertedFrame.get();
|
||||
}
|
||||
|
||||
IWICBitmapFlipRotator* aRotator;
|
||||
bool isTopDown = true;
|
||||
if (aWicImgFactory->CreateBitmapFlipRotator(&aRotator) == S_OK
|
||||
Image_ComPtr<IWICBitmapFlipRotator> aRotator;
|
||||
bool isTopDown = true;
|
||||
if (aWicImgFactory->CreateBitmapFlipRotator(&aRotator.ChangePtr()) == S_OK
|
||||
&& aRotator->Initialize(aWicSrc, WICBitmapTransformFlipVertical) == S_OK)
|
||||
{
|
||||
isTopDown = false;
|
||||
aWicSrc = aRotator;
|
||||
aWicSrc = aRotator.get();
|
||||
}
|
||||
|
||||
if (aWicSrc->CopyPixels(NULL, (UINT)SizeRowBytes(), (UINT)SizeBytes(), ChangeData()) != S_OK)
|
||||
|
||||
Reference in New Issue
Block a user