Hi Friends
How is final different from finally and finalize()?
Different from finally and finalize()
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sandeep Singh ShekhawatRank #147 · 15.6K reputationPosted Oct 12, 2012, 10:05 PM EDT
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.