Hi Friends
How is final different from finally and finalize()?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sandeep Singh ShekhawatPosted Oct 13, 2012, 2:05 AM
Finalize():
The Finalize method is used to perform cleanup operations on unmanaged resources held by the current object before the current object is destroyed.
In C# destructor are converted to finalize method by C# compiler.
The scope of the Object.Finalize method is protected.
The Finalize() destructor is called after the last reference to an object is released from the memory.
It is automatically called by garbage collector to release resource.
The exact time when the finalizer executes during garbage collection is undefined.