New submission from Cristian Martinez de Morentin <[email protected]>:
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.
----------
components: Windows
messages: 367760
nosy: Cristian Martinez de Morentin, paul.moore, steve.dower, tim.golden,
zach.ware
priority: normal
severity: normal
status: open
title: Unexpected sys.getrefcount(foo) output
type: behavior
versions: Python 3.8
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue40451>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com