From 9fc60a0c001bd5f68fcff56d1c3e117a56a332b5 Mon Sep 17 00:00:00 2001 From: whitequark Date: Wed, 18 May 2016 18:20:43 +0400 Subject: [PATCH] Cocoa: fix massive memory leak. --- src/cocoa/cocoamain.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cocoa/cocoamain.mm b/src/cocoa/cocoamain.mm index c1d15a0..d3f6733 100644 --- a/src/cocoa/cocoamain.mm +++ b/src/cocoa/cocoamain.mm @@ -221,6 +221,9 @@ CONVERT(Rect) CGContextDrawImage((CGContextRef) [[NSGraphicsContext currentContext] graphicsPort], [self bounds], image); + + CGImageRelease(image); + CGDataProviderRelease(provider); } - (void)drawGL {