Skip to content

Commit

Permalink
StringBuilderPool - Allow FastPool-object to have larger capacity, bu…
Browse files Browse the repository at this point in the history
…t remember to reset (#3345)
  • Loading branch information
snakefoot authored and 304NotModified committed Apr 29, 2019
1 parent adeb5c0 commit f8f7414
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/NLog/Internal/StringBuilderPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,10 @@ private void Release(StringBuilder stringBuilder, int poolIndex)
{
stringBuilder = new StringBuilder(maxBuilderCapacity / 2);
}
}
else
{
stringBuilder.Length = 0;
}

stringBuilder.Length = 0;

if (poolIndex == -1)
{
_fastPool = stringBuilder;
Expand Down

0 comments on commit f8f7414

Please sign in to comment.