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 loewis
Recipients benjamin.peterson, hynek, loewis, pitrou, serhiy.storchaka, stutzbach
Date 2012-07-29.21:11:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1343596283.29.0.179804216706.issue15490@psf.upfronthosting.co.za>
In-reply-to
Content
The question really is what memory blocks can "leak out" of the object, and those don't really belong to the container. Those shouldn't be accounted for, since somebody else may get hold of them, and pass them to sys.sizeof.

For the PyAccu, AFAICT, objects cannot leak out of it (except for gc.getobjects in debug mode). So I think the memory allocated by the accu really belongs to the StringIO, and needs to be accounted there. The same goes for readnl, writenl, and weakreflist.

On a related note, I wonder why the tp_clear and tp_traverse functions for stringio are so short. Shouldn't it also visit "decoder"?
History
Date User Action Args
2012-07-29 21:11:23loewissetrecipients: + loewis, pitrou, benjamin.peterson, stutzbach, hynek, serhiy.storchaka
2012-07-29 21:11:23loewissetmessageid: <1343596283.29.0.179804216706.issue15490@psf.upfronthosting.co.za>
2012-07-29 21:11:22loewislinkissue15490 messages
2012-07-29 21:11:22loewiscreate