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 7a92772 commit 20c5732Copy full SHA for 20c5732
src/core/IronPython/Runtime/Types/PythonType.cs
@@ -2498,7 +2498,9 @@ private void AddSubType(PythonType subtype) {
2498
}
2499
2500
lock (_subtypesLock) {
2501
- _subtypes.RemoveAll(x => !x.TryGetTarget(out _)); // remove dead entries
+ if (_subtypes.Count == _subtypes.Capacity) {
2502
+ _subtypes.RemoveAll(x => !x.TryGetTarget(out _)); // remove dead entries
2503
+ }
2504
_subtypes.Add(new WeakReference<PythonType>(subtype));
2505
2506
0 commit comments