From 8d066ff29588fd0b6d6e87316ed5a63a7d4a163e Mon Sep 17 00:00:00 2001 From: Morilli <35152647+Morilli@users.noreply.github.com> Date: Fri, 11 Apr 2025 14:14:32 +0200 Subject: [PATCH] don't reserve branch frame savestates There was no eviction logic so the reserved frames would accumulate and never be cleaned, leading to continuously increasing memory usage. Additionally I don't know why they would need to be reserved in the first place --- src/BizHawk.Client.Common/movie/tasproj/TasMovie.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/BizHawk.Client.Common/movie/tasproj/TasMovie.cs b/src/BizHawk.Client.Common/movie/tasproj/TasMovie.cs index 5a1c8dc2eb..c02ef63725 100644 --- a/src/BizHawk.Client.Common/movie/tasproj/TasMovie.cs +++ b/src/BizHawk.Client.Common/movie/tasproj/TasMovie.cs @@ -345,8 +345,7 @@ namespace BizHawk.Client.Common // Why the frame before? // because we always navigate to the frame before and emulate 1 frame so that we ensure a proper frame buffer on the screen // users want instant navigation to markers, so to do this, we need to reserve the frame before the marker, not the marker itself - return Markers.Exists(m => m.Frame - 1 == frame) - || Branches.Any(b => b.Frame == frame); // Branches should already be in the reserved list, but it doesn't hurt to check + return Markers.Exists(m => m.Frame - 1 == frame); } public void Dispose()