This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Cristian Martinez de Morentin
Recipients Cristian Martinez de Morentin, paul.moore, steve.dower, tim.golden, zach.ware
Date 2020-04-30.15:18:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1588259890.93.0.389588994308.issue40451@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-04-30 15:18:10Cristian Martinez de Morentinsetrecipients: + Cristian Martinez de Morentin, paul.moore, tim.golden, zach.ware, steve.dower
2020-04-30 15:18:10Cristian Martinez de Morentinsetmessageid: <1588259890.93.0.389588994308.issue40451@roundup.psfhosted.org>
2020-04-30 15:18:10Cristian Martinez de Morentinlinkissue40451 messages
2020-04-30 15:18:10Cristian Martinez de Morentincreate