[issue14596] struct.unpack memory leak

Robert Elsner report at bugs.python.org
Mon Apr 23 11:24:01 CEST 2012


Robert Elsner <robert.elsner2 at googlemail.com> added the comment:

Well then at least the docs need an update. I simply fail to see how a
cache memory leak constitutes "just fine" (while the caching behavior of
struct.unpack is not documented - if somebody wants caching, he ought to
use struct.Struct.unpack which does cache and does not leak). Something
like a warning: "struct.unpack might display memory leaks when parsing
big files using large format strings" might be sufficient. I do not like
the idea of code failing outside some not-documented "use-case".
Especially as those problems usually indicate some underlying design
flaw. I did not review the proposed patch but might find time to have a
look in a few months.

cheers

Am 20.04.2012 19:56, schrieb Mark Dickinson:
> 
> Mark Dickinson <dickinsm at gmail.com> added the comment:
> 
> IMO, the struct module does what it's intended to do just fine here.  I don't a big need for any change.  I'd propose closing this as "won't fix".
> 
> ----------
> 
> _______________________________________
> Python tracker <report at bugs.python.org>
> <http://bugs.python.org/issue14596>
> _______________________________________

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14596>
_______________________________________


More information about the Python-bugs-list mailing list