G
Gabriel Genellina
Hi
With Python 2.5, there is a change on the reference count of objects
compared with previous versions (as reported by sys.getrefcount).
All Python versions from 2.1 thru 2.4 gave these same results:
Python 2.1.3 (#35, Apr 8 2002, 17:47:50) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
But Python 2.5 (2.5.1 not tested yet) gives different results:
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)]
on win
32
In particular, I wonder why getrefcount(12341234) returns 3 instead of 2 -
who is holding the extra reference?
My main two concerns are:
- is there a reference leak somewhere?
- it's a bit harder to debug my own references since I don't know
beforehand the value I should expect from sys.getrefcount()
With Python 2.5, there is a change on the reference count of objects
compared with previous versions (as reported by sys.getrefcount).
All Python versions from 2.1 thru 2.4 gave these same results:
Python 2.1.3 (#35, Apr 8 2002, 17:47:50) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
But Python 2.5 (2.5.1 not tested yet) gives different results:
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)]
on win
32
In particular, I wonder why getrefcount(12341234) returns 3 instead of 2 -
who is holding the extra reference?
My main two concerns are:
- is there a reference leak somewhere?
- it's a bit harder to debug my own references since I don't know
beforehand the value I should expect from sys.getrefcount()