Attempt to fix OutOfMemory when saving states (I guess it works)
Just add an EnsureCapacity() before appending log. I didn't have any crash yet compare to current release. Let's hope!
This commit is contained in:
parent
3844bf3c12
commit
f0ab9edc10
|
@ -299,8 +299,9 @@ namespace BizHawk.Client.Common
|
|||
var lg = new Bk2LogEntryGenerator(LogKey);
|
||||
lg.SetSource(Global.MovieOutputHardpoint);
|
||||
|
||||
var sb = new StringBuilder();
|
||||
var sb = new StringBuilder();
|
||||
sb.AppendLine(lg.GenerateLogKey());
|
||||
sb.EnsureCapacity(sb.Capacity + _log.Count);
|
||||
foreach (var record in _log)
|
||||
{
|
||||
sb.AppendLine(record);
|
||||
|
|
Loading…
Reference in New Issue