Link to home
Start Free TrialLog in
Avatar of Declan Basile
Declan BasileFlag for United States of America

asked on

How can I Dispose of a previously referenced Instance in VB.net?

In VB.net, there is a class (class "Login") with a private variable that references an instance of another class (class "User").  If Login.User already references an instance of a User and now I want it to reference a new instance of a User and dispose of the old instance, do I need to explicitly dispose of the old instance (Login.User.dispose) before creating and assigning a reference to the new user (Login. User = New User) or will assigning a reference to the new instance automatically dispose of the old instance?  If so, how would I do this?
ASKER CERTIFIED SOLUTION
Avatar of Russ Suter
Russ Suter

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
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
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
Avatar of Declan Basile

ASKER

Thanks everyone.