Skip to content

Commit cdc934e

Browse files
committed
Fix pooled StringBuilders not being cleared
1 parent f94108f commit cdc934e

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/Libraries/Covalence/Formatter.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,7 @@ private static string ToTreeFormat(List<Element> tree, Dictionary<ElementType, F
610610
}
611611
finally
612612
{
613+
sb.Length = 0;
613614
stringPool.Return(sb);
614615
}
615616
}

src/Oxide.Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</PropertyGroup>
1919
<ItemGroup>
2020
<PackageReference Include="Lib.Harmony" Version="2.3.1.1" />
21-
<PackageReference Include="Oxide.Common" Version="2.0.40-develop" />
21+
<PackageReference Include="Oxide.Common" Version="2.0.44-develop" />
2222
<PackageReference Include="Oxide.References" Version="2.0.*">
2323
<PrivateAssets>contentfiles;analyzers;build</PrivateAssets>
2424
</PackageReference>

src/Plugins/Watchers/FSWatcher.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
extern alias References;
1+
extern alias References;
22

33
using Oxide.Core.Libraries;
44
using System;
@@ -124,6 +124,7 @@ private void LoadWatcherSymlink(string path)
124124
}
125125
finally
126126
{
127+
str.Length = 0;
127128
StringPool.Return(str);
128129
}
129130
}

0 commit comments

Comments
 (0)