Message367760
Hello, I have observed a strange behaviour regarding reference counting in Python 3.8.2 (Windows 64 bits). Perhaps, it could be linked to a memory leakage issue.
In the following code, I would not expect an output of '137' for the reference counter of the 'aux' object. Could you please explain this behaviour?
>>> import sys
>>> test = {'a': 0, 'b': 1}
>>> sys.getrefcount(test)
2
>>> aux = test['b']
>>> sys.getrefcount(aux)
137
Thank you so much. |
|
Date |
User |
Action |
Args |
2020-04-30 15:18:10 | Cristian Martinez de Morentin | set | recipients:
+ Cristian Martinez de Morentin, paul.moore, tim.golden, zach.ware, steve.dower |
2020-04-30 15:18:10 | Cristian Martinez de Morentin | set | messageid: <1588259890.93.0.389588994308.issue40451@roundup.psfhosted.org> |
2020-04-30 15:18:10 | Cristian Martinez de Morentin | link | issue40451 messages |
2020-04-30 15:18:10 | Cristian Martinez de Morentin | create | |
|