Browse Source

Destroy screenshot tex before cleanup

ghorsington 4 years ago
parent
commit
a412509b75
1 changed files with 2 additions and 0 deletions
  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();