What is the concept of destructor in VB.NET?

Started by beingchinmay, 11-04-2016, 03:26:04

Previous topic - Next topic

beingchinmayTopic starter

Destructors used to de-allocate resources it clean up after an object is no longer available. Finalize is the destructor which is normally used. Finalize is called automatically when the .NET runtime determines that the object is no longer being used.


Lishmalinyjames

A destructor is a special member Sub of a class that is executed whenever an object of its class goes out of scope. A destructor has the name Finalize and it can neither return a value nor can it take any parameters. Destructors cannot be inherited or overloaded.