Skip to content

Commit 53ff8aa

Browse files
committed
auto clearing StringStore
1 parent bcdc902 commit 53ff8aa

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

Assets/Mirage/Runtime/Serialization/NetworkReaderPool.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ protected override void Dispose(bool disposing)
118118
// => dont put it back for finalize
119119
if (disposing)
120120
{
121+
StringStore = null; // clear store reference before putting back into pool
121122
_pool.Put(this);
122123
}
123124
}

Assets/Mirage/Runtime/Serialization/NetworkWriterPool.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ public void Release()
8585
return;
8686

8787
Reset();
88+
StringStore = null; // clear store reference before putting back into pool
8889
_pool.Put(this);
8990
_inPool = true;
9091
}

0 commit comments

Comments
 (0)