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.