Переглянути джерело

Destroy screenshot tex before cleanup

ghorsington 4 роки тому
батько
коміт
a412509b75
1 змінених файлів з 2 додано та 0 видалено
  1. 2 0
      COM3D2.ToukaScreenShot.Plugin/ToukaScreenShot.cs

+ 2 - 0
COM3D2.ToukaScreenShot.Plugin/ToukaScreenShot.cs

@@ -108,6 +108,8 @@ namespace CM3D2.ToukaScreenShot.Plugin
             var ss = GetToukaScreenShot();
             File.WriteAllBytes(GetTimeFileName(), ss.EncodeToPNG());
             
+            Destroy(ss);
+            
             // Actually unload textures and GC unused stuff to free up memory
             yield return Resources.UnloadUnusedAssets();
             GC.Collect();