Skip to content

Commit 42d135d

Browse files
🐛 Clear context buffers upon rent
1 parent 60c3536 commit 42d135d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lite3DotNet/Lite3Context.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ public static Lite3Context Create(int initialCapacity = Lite3Buffer.MinBufferSiz
2525

2626
var buffer = arrayPool.Rent(initialCapacity);
2727

28+
buffer.AsSpan().Clear();
29+
2830
return new Lite3Context(buffer, position: 0, isRentedBuffer: true, arrayPool);
2931
}
3032

0 commit comments

Comments
 (0)