Skip to content

Commit 306b04c

Browse files
committed
Clarify the amount of elements processed per cycle
1 parent 4811281 commit 306b04c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/Avalonia.Base/Rendering/Composition/Drawing/Nodes/RenderDataNodePool.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ public bool Reduce()
118118
if (_count == 0)
119119
return false;
120120

121+
// Release a third of the pool per cycle, at least 1.
121122
var release = Math.Max(1, _count / 3);
122123
var newCount = _count - release;
123124
Array.Clear(_items, newCount, release);

0 commit comments

Comments
 (0)