I believe that when you remove an object from a collection its link to the collection is removed/destroyed but the object still exists. If you want to remove/destroy the object entirely and free up the memory it uses then set the object equal to nothing after it has been removed from the collection.
Thanks and Good Luck!
The object is destroyed when there are no more references to it. You can not "set" an object to Nothing. You can set a variable that contains an object reference to Nothing. Therefore if you use the Remove method to take a reference to an object out of a Collection then the Remove method sets the Collection's reference to that object to Nothing and if that was the last reference to that object then the object will be destroyed after its Class_Terminate event is triggered.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.