Class reference and GC loop in C #
I saw someone write int code in the following style:
Dictionary<string,SomeClass> dict = new Dictionary<string,SomeClass>();
...
dict.Add(key,someClass);
...
dict[key] = null;
dict.Remove(key);
I wonder if it's needed dict[key] = null;
. Does this mean informing the GC? But what someClass
is not mentioned anywhere else, Is it redundant?
+3
source to share