Martin v. Löwis added the comment:

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"?

----------
nosy: +loewis

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15490>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to