Autorelease the system default Metal device

This commit is contained in:
Cameron Gutman 2024-04-19 00:29:51 -05:00
parent fe6562e31c
commit 4aa2b8570c

View file

@ -610,7 +610,7 @@ public:
if (qgetenv("VT_FORCE_METAL") == "1") {
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
"Using Metal renderer due to VT_FORCE_METAL=1 override.");
return MTLCreateSystemDefaultDevice();
return [MTLCreateSystemDefaultDevice() autorelease];
}
else {
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,