Fix Little Memory Leaks

This commit is contained in:
copecone committed 2026-05-27 15:44:55 +09:00
1 parent 9454226306
commit 42741c2cb2
2 files changed
+18 -1

No files matched your search

+12 -1
View File
@@ -22,7 +22,8 @@ namespace ADOFAIRenderer.Component
private static GameObject? _debugMonitorObj;
private static GameObject? _escapeHandlerObj;
private static string? _currentOutPath;
private static bool _isRenderCancelled = false;
public static RenderSettings Configuration;
public struct RenderSettings
@@ -291,6 +292,11 @@ namespace ADOFAIRenderer.Component
continue;
}
if (_isRenderCancelled)
{
break;
}
if (EndRequested)
{
bool hasMore;
@@ -319,6 +325,8 @@ namespace ADOFAIRenderer.Component
public void CancelRender()
{
RenderMod.IsRendering = RenderMod.IsCapturing = false;
_isRenderCancelled = true;
StopFFmpeg(false);
EndRender();
}
@@ -353,6 +361,8 @@ namespace ADOFAIRenderer.Component
}
ImageQueue.Clear();
}
RenderMod.FrameReader?.Dispose();
// 디버그 모니터 UI 정리
if (_debugMonitorObj)
@@ -423,6 +433,7 @@ namespace ADOFAIRenderer.Component
GCS.customLevelPaths = null;
GCS.customLevelId = null;
RenderMod.FrameReader?.Dispose();
ADOBase.loader.LoadSceneWithTransition(WipeDirection.StartsFromRight, "scnEditor");
}
}