M
Microsoft
I am working on a VB.NET (2003) application and I am confused about object
lifetimes. I have a class of objects that are created in a manager class and
added to a collection in that class. I am not sure how to destroy an object
once it is no longer required as a part of the collection. In VB 6 I would
have assigned "nothing" to it. According to my extensive reading this is not
the way to go with VB.NET.
My objects are derived from "Object" as is my class that has the collection.
Will the objects be destroyed when the ref-count goes to zero?
All the objects only have managed resources allocated, so do I need to
implement a Dispose method?
Many thanks,
Sid.
lifetimes. I have a class of objects that are created in a manager class and
added to a collection in that class. I am not sure how to destroy an object
once it is no longer required as a part of the collection. In VB 6 I would
have assigned "nothing" to it. According to my extensive reading this is not
the way to go with VB.NET.
My objects are derived from "Object" as is my class that has the collection.
Will the objects be destroyed when the ref-count goes to zero?
All the objects only have managed resources allocated, so do I need to
implement a Dispose method?
Many thanks,
Sid.