Cocoa: fix memory leak
Release the created CGImageRef. Change-Id: If3b36b636ae1302b8a63bbae7285a6461b993f62 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
parent
0a7e6c5856
commit
3ebee851b2
@ -135,7 +135,10 @@ NSImage *qt_mac_cgimage_to_nsimage(CGImageRef image)
|
|||||||
NSImage *qt_mac_create_nsimage(const QPixmap &pm)
|
NSImage *qt_mac_create_nsimage(const QPixmap &pm)
|
||||||
{
|
{
|
||||||
QImage image = pm.toImage();
|
QImage image = pm.toImage();
|
||||||
return qt_mac_cgimage_to_nsimage(qt_mac_image_to_cgimage(image));
|
CGImageRef cgImage = qt_mac_image_to_cgimage(image);
|
||||||
|
NSImage *nsImage = qt_mac_cgimage_to_nsimage(cgImage);
|
||||||
|
CGImageRelease(cgImage);
|
||||||
|
return nsImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
HIMutableShapeRef qt_mac_QRegionToHIMutableShape(const QRegion ®ion)
|
HIMutableShapeRef qt_mac_QRegionToHIMutableShape(const QRegion ®ion)
|
||||||
|
Loading…
Reference in New Issue
Block a user