Form.close()

In VB.NET: Does close() method of the form completely release every allocated resources for that form. In VB6 I have to set the form to nothing after unloading it to completely remove allocated resources. What about VB.NET?

Please verify your answer
f_asmaaAsked:
Who is Participating?
 
ChillAmmarCommented:
Yes, in VB.NET the Close() method automatically deloactes the ersources used by the form, this job is done by the Garbage Collector.
For eg.
If you have a SQL conncetion which is being open on the form load().
and when the form.Close() method is called the SQL conncetion is automatically closed. which is not the case with VB 6.0 or earlier wher you manually had to close the opened SQL conncetion otherwise the conncetion left open until it gets timed out.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.