Is the Finalizers disigned for releasing unmanaged resources?

Copper Contributor

Doc is here 

I mentioned that the description means finalizer is used to do some additional clean-up that the GC can't complete.

Now I am reading Dispose pattern documents.

After examining the example of docs, I found If I don't implement finalizer for class, it isn't neccessary for me to code the section of releasing unmanaged resource. So I think finalizer is used to free unmanaged resource when I have used reference of them directly inside the class.

If class doesn't refer unmanaged resource directly, it shouldn't exist in class.

 

If my opinion is inappropriate, leave your opnion please...

0 Replies