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

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
0
f_asmaa
Asked:
f_asmaa
1 Solution
 
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

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