I have a form that calls a class (class 1). Inside class 1, there is a call to another class (class 2). Normally, I like to set all variables to nothing that I have set to something. My question is, if I run code like the following, is class 2 also removed from memory?
Or do I need to create a Terminate sub within class 1 that would set class 2 to nothing within class 1 before I set class 1 to nothing? I know that it doesn't hurt anything to do as I just described, but if I don't need to, then there isn't any point in doing it. And I don't know how to test this out for myself.
Code:
Dim cls as Class1 Set cls = New Class 1 ... Set cls = nothing
Comment