• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 182
  • Last Modified:


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
1 Solution
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.

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

Tackle projects and never again get stuck behind a technical roadblock.
Join Now