I have a class, myClass, which has a property:
localRead as localreadDelegate
with the class having a Delegate definition with the appropriate parameters.
Now, when I create an instance of myClass, I do this:
Var myclassInst as myClass
myclassInst = new myClass
myclassInst.localRead = AddressOf mySocket.localRead
Now this question is this: when the instance myclassInst done with, goes out of scope and is destroyed, do I need to do anything about the AddressOf? Such as setting it to Nil first? If not, why is that different for AddHandler?
I’m looking at this because I recently added code so that a debug version of my app reports on all the object types it has and how many of each there are, and it looks like the delegate count is inching up as time passes.
4 posts - 3 participants