[issue14596] struct.unpack memory leak
Mark Dickinson
report at bugs.python.org
Mon Apr 16 15:25:29 CEST 2012
Mark Dickinson <dickinsm at gmail.com> added the comment:
> It appears the storage of Struct instances is rather inefficient when
> there's a repeat code such as "<48L"
Right. Repeat counts aren't directly supported in the underlying PyStructObject; a format string containing repeat counts is effectively 'compiled' to a series of (type, offset, size) triples before it can be used. The caching is there to save repeated compilations when the same format string is used repeatedly.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14596>
_______________________________________
More information about the Python-bugs-list
mailing list