Subject: Vb.net 2003
Posted By: Kirti.darji Post Date: 7/6/2006 8:20:19 AM
Hi Am kirti

I Understand One thing that despose And Finalize Method in .net But When They Use In Coding How Can We Get Idea This Time Use Despose() And This Time Finalize

Thank In Advance

Reply By: Unna Reply Date: 8/18/2006 11:12:13 AM
Kirti,

As per MSDN help file this is the difference:

Dispose
Some objects support a method named Dispose whose purpose is to release system resources more expeditiously. Classes that support the Dispose method should implement the IDisposable interface. The Dispose method needs to be explicitly called when you want to release object resources. For example:

ThisObject.Dispose

Finalize
Another method supported by some classes, Finalize, runs automatically when an object is released and can be used to perform other cleanup tasks. The Finalize method is similar to the Class_Terminate() method used in previous versions of Microsoft Visual Basic. Unlike the Dispose method, the CLR automatically calls the Finalize method sometime after an object is no longer needed.




Go to topic 48407

Return to index page 519
Return to index page 518
Return to index page 517
Return to index page 516
Return to index page 515
Return to index page 514
Return to index page 513
Return to index page 512
Return to index page 511
Return to index page 510