Consider the following code:
var ob = {}
var ref1 = ob;
var ref2 = ob;
var ob2 = { ref3: ob };
Now I want to get a list of all 4 references to the object by one of them (ob, ref1, ref2, ob2.ref3)
Is it possible? Is there a way to get info how much references the object has if not?
UPDATE
Explanation
I need to register a class instance instead of previous one in a third party class hierarchy and I need to know where old one was referenced from