-
I don't know much about Doing COM in C++ but I think there is a way of knowing when a reference to your class is created and relesed, eg if you do this
Code:
Dim x as New myClass
Dim y as MyClass
Set y = x
Set x = Nothing
you would be told that a reference to your class was created when the line Set y = x Runs and told that one has bee relesed when set x = nothing runs
it there a way of knowing this in VB?
-
Ok I see what you mean. the terminate is only called when the last reference is released.
Uhmm I can't think of a way to figure out...
What you can do is create a function which returns a copy of the current class, if you use that to get more references (instead of the Set y = x) it might work. But AFAIK there's no way to get a refcount.