Преглед на файлове

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();