Skip to content

Commit d4f4b31

Browse files
authored
Merge pull request #564 from Sergio0694/dev/return-lost-array
Return rented array to array pool
2 parents 86dc363 + 10406e0 commit d4f4b31

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ComputeSharp.D2D1.UI/Extensions/ID2D1EffectExtensions.cs

+2
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ public static T GetConstantBuffer<T>(this ref ID2D1Effect d2D1Effect)
5757

5858
shader.InitializeFromDispatchData(buffer.AsSpan(0, constantBufferSize));
5959

60+
ArrayPool<byte>.Shared.Return(buffer);
61+
6062
return shader;
6163
}
6264

0 commit comments

Comments
 (0)