Link to home
Start Free TrialLog in
Avatar of bman9111
bman9111

asked on

vb.net dispose

I was curious is it necessary to use .dispose

for example
dataadapter.dispose
con.dispose


form1.dispose

what is the point, does it do anything????


ASKER CERTIFIED SOLUTION
Avatar of prairiedog
prairiedog
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of thenrich
thenrich

To answer your question it's not really common practice to use the dispose method unless your really strapped for resources. As mentioned above the garbage collector will get it sooner or later
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Excellant point about using it for the unmanaged code. But again - Is there a lot of development with unmanaged code in VB .NET maybe in some cases but in general - no. For the most part it's just extra coding that doesn't need to be there.