We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c01e8c9 commit 42c7c31Copy full SHA for 42c7c31
Src/IronPython/Runtime/Types/PythonType.cs
@@ -2504,7 +2504,9 @@ private void AddSubType(PythonType subtype) {
2504
}
2505
2506
lock (_subtypesLock) {
2507
- _subtypes.RemoveAll(x => !x.TryGetTarget(out _)); // remove dead entries
+ if (_subtypes.Count == _subtypes.Capacity) {
2508
+ _subtypes.RemoveAll(x => !x.TryGetTarget(out _)); // remove dead entries
2509
+ }
2510
_subtypes.Add(new WeakReference<PythonType>(subtype));
2511
2512
0 commit comments