Dotnet garbage collector not collection objects when I change reference to null [duplicate]
This question already has an answer here: .NET6 finalizer isn’t called when project started from command line (1 answer) Closed 3 months ago. I wanted to try how garbage collector works in .NET, but results are not clear for me. public class Test { public string Name { get; set; } ~Test() { Console.WriteLine(“NICE”); } […]
Dotnet garbage collector not collection objects when I change reference to null [duplicate]
This question already has an answer here: .NET6 finalizer isn’t called when project started from command line (1 answer) Closed 3 months ago. I wanted to try how garbage collector works in .NET, but results are not clear for me. public class Test { public string Name { get; set; } ~Test() { Console.WriteLine(“NICE”); } […]