C# internally generates a base.finalize() call when you use the destrutor syntax. Though most people do not know about this, it still save a lot of possible leaks.
VB.NET did not have this feature and you had to manually put this in. The IDE puts in a MyBase.Finalize when you choose the finalize method from the dropdown.
But the problem is, what happens if I just type the sub definition?? No code is inserted. Likewise, since code is just inserted, someone can delete it too and this may lead to a problem.
The same holds good in the new Whidbey Technical Preview version too!!!
I would prefer if VB.NET also generates internal code to call the base finalizer....
Paul, Will my wish come true????


We're not planning on having a destructor syntax like C# in Whidbey, and new syntax would be required to generate the automatic finalize call. However, we are looking at ways of simplifying creating destructors and ensuring it's done correctly.
Posted by: Paul Vick | December 03, 2003 at 11:19 AM
Hi
Is their any Fast track VB.net course Avaliable, becasue I will be comeing to India in Feb for about two months and want to update my skillset.
I tried emailing Aptech and NIIT but no response.
Thanks
Chirag
Posted by: Chirag | December 30, 2003 at 12:49 AM
I want to mention one thing about Finaliza method in VB.Net Finalize methode is called just prior to the object being terminated by the garbage collection mechanism and not when the object goes out of its context. Hence the object will sit in memory until garbage collector is run. So don't free resources in Finalize method, instead write destroy mothod sepearately and do the same thing as in Finalize and call it when object in no more required.
Posted by: Bhagvan | November 02, 2004 at 05:46 AM
I am developing project in asp.Net with Code Behind file in vb.Net. I used Finalize method in VB.Net but the problem is when the form gets unload, Finalize method gets executed twice or thrice.
Can anybody tell me y ??????
Posted by: Deepak | August 24, 2005 at 02:54 AM
Hi friends,
I am working as DotNET Programmer for the past 1 Year,i am intrested to update DoNET Technologies,can anyone give me someidea,how to prepare and also i am intrested to write the MCP
Thanks Regards,
P.Ramesh
Posted by: Ramesh.P | September 19, 2005 at 02:12 PM