From 5182c23c6b65a3249cc2330cbd7e78e81f8f741a Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 8 Dec 2017 11:35:19 -0800 Subject: [PATCH] Fixed minor memory leak in the Metal renderer --- src/render/metal/SDL_render_metal.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/render/metal/SDL_render_metal.m b/src/render/metal/SDL_render_metal.m index eb5ef5df0..9fb3de47a 100644 --- a/src/render/metal/SDL_render_metal.m +++ b/src/render/metal/SDL_render_metal.m @@ -736,6 +736,10 @@ METAL_RenderPresent(SDL_Renderer * renderer) }]; #endif [data.mtlcmdbuffer commit]; +#if !__has_feature(objc_arc) + [data.mtlcmdencoder release]; + [data.mtlcmdbuffer release]; +#endif data.beginScene = YES; }