[issue19859] functools.lru_cache keeps objects alive forever

Raymond Hettinger report at bugs.python.org
Wed Dec 4 22:24:57 CET 2013


Raymond Hettinger added the comment:

I'm not in favor of filling the docs with warnings like this.  It tends to make everything sound dangerous even when the tools are doing exactly what they are supposed to do.

Every container (except for the weakref containers) keeps their references alive.  That is how Python works.  The LRU cache is no more special in this regard than a dictionary, list, or set.   In addition, the older entries get flushed-out and freed as the LRU cache gets newer entries.

[Radomir Dopieralski]
> So please consider this patch abandoned.

Marking this as closed.

----------
resolution:  -> rejected
status: open -> closed

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


More information about the Python-bugs-list mailing list