Open
Description
when use the weakList class to creat a oj as list and set a item as null, “GC.Collect();” dosen‘t work.
For excemple:
var list = new WeakList();
var obj1 = new object();
var obj2 = new object();
var obj3 = new object();
obj1 = null;
GC.Collect();
Assert.Equal(new[] { obj2, obj3 }, list.ToList());
the test result is false
the unitTest's path is "src/Nncase.Tests/Core/UnitTestWeakList.cs"
Metadata
Assignees
Labels
No labels