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 pitrou
Recipients amaury.forgeotdarc, loewis, pitrou, rhettinger, serhiy.storchaka
Date 2013-09-19.18:17:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Here is why using get_referents() is stupid in the general case:

>>> class C: pass
>>> c = C()
>>> gc.get_referents(c)
[<class '__main__.C'>]

With your method, measuring c's memory consumption also includes the memory consumption of its type object.
(and of course this is only a trivial example... one can only imagine what kind of mess it is with a non-trivial object)
Date User Action Args
2013-09-19 18:17:46pitrousetrecipients: + pitrou, loewis, rhettinger, amaury.forgeotdarc, serhiy.storchaka
2013-09-19 18:17:46pitrousetmessageid: <>
2013-09-19 18:17:46pitroulinkissue19048 messages
2013-09-19 18:17:46pitroucreate