Skip to content

Commit

Permalink
Clear array pool (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
gfoidl committed Nov 8, 2019
1 parent 87ea9b5 commit b6b35f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ string EncodeWithNewString(ReadOnlySpan<byte> data)
{
if (arrayToReturnToPool != null)
{
encoded.Clear();
ArrayPool<char>.Shared.Return(arrayToReturnToPool);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ string EncodeWithNewString(ReadOnlySpan<byte> data)
{
if (arrayToReturnToPool != null)
{
encoded.Clear();
ArrayPool<char>.Shared.Return(arrayToReturnToPool);
}
}
Expand Down

0 comments on commit b6b35f0

Please sign in to comment.