Kaynağa Gözat

Fixed Metal ARC leak when freeing GPU window data (thanks @imjakey!)

Fixes https://github.com/libsdl-org/SDL/issues/16345
Sam Lantinga 1 gün önce
ebeveyn
işleme
6772e3fd17
1 değiştirilmiş dosya ile 4 ekleme ve 0 silme
  1. 4 0
      src/gpu/metal/SDL_gpu_metal.m

+ 4 - 0
src/gpu/metal/SDL_gpu_metal.m

@@ -3837,6 +3837,10 @@ static void METAL_ReleaseWindow(
         }
         }
         SDL_UnlockMutex(renderer->windowLock);
         SDL_UnlockMutex(renderer->windowLock);
 
 
+        windowData->layer = nil;
+        windowData->drawable = nil;
+        windowData->texture.hanlde = nil;
+
         SDL_free(windowData);
         SDL_free(windowData);
 
 
         SDL_ClearProperty(SDL_GetWindowProperties(window), WINDOW_PROPERTY_DATA);
         SDL_ClearProperty(SDL_GetWindowProperties(window), WINDOW_PROPERTY_DATA);