I am learning how the garbage collector works in C #. I am confused about using Destructor , Dispose and Finalize methods.
According to my research and understanding, the Destructor method in my class will tell the garbage collector to collect garbage in the manner specified in the destructor method, which cannot be explicitly called in class instances.
The Dispose method is designed to provide the user with the ability to control garbage collection. The Finalize method frees the resources used by the class, but not the object itself.
I am not sure if I understand correctly. Please clarify doubts. Any additional links or manuals are appreciated.
Victor Mukherjee Dec 21 '12 at 10:25 2012-12-21 10:25
source share