Skip to content

bug in nncase's WeakList #960

Open
Open
@HeJunchao100813

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions