The text of this article is not in this database — only its details are. Read it on the old site: Understanding Destructors in VB.NET
1 Comment
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
The text of this article is not in this database — only its details are. Read it on the old site: Understanding Destructors in VB.NET
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
kendall morleyPosted May 25, 2007, 1:31 AM
When an instance is destructed, the destructors in its inheritance chain are called, in order, from most derived to least derived. In vb.net you can overide the finalize method and it is upto you to include a call to Mybase.Finalize. So it is possible that the derived finalize is the only finalize to be called. In c# you cannot explicitly override the finalize method and the compiler will place a call to it in the destructor, so it is imposible to forget to cal base.finalize