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
This commit is contained in:
Morilli 2025-04-11 14:14:32 +02:00
parent a09803e793
commit 8d066ff295
1 changed files with 1 additions and 2 deletions

View File

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