浏览代码

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