raghu wrote: > Hi All, > > The sys.getrefcount() is very useful to get the number of references on > a particular object. > > Is there any companion function to get "who" the referrers are ? > > for e.g. > > global x > global y > global z > > > x0=24012 > y=x0 > z=x0 > > print "ref count ",sys.getrefcount(x0) > > > This prints a ref count of 5. > > Basically, I need to know which are the 5 entities who are referring to > x0 ? > > Is there any way of doing it ?
Look into the gc-module. Diez -- http://mail.python.org/mailman/listinfo/python-list