raghu wrote:
> Diez,
>
> I did look into gc, specifically gc.get_referrers(), but it seemed to
> give me something that I cant decipher.
>
> I added the following line.
>
> print "referrers ",gc.get_referrers(x0)
>
> This is what I got.
>
&
Diez,
I did look into gc, specifically gc.get_referrers(), but it seemed to
give me something that I cant decipher.
I added the following line.
print "referrers ",gc.get_referrers(x0)
This is what I got.
referrers [{'__builtins__': ,
'__file__': './tst1.py&
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
>
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 pri