Message395075
# Problem
the functools.lru_cache decorator locks all arguments to the function in memory (inclusing self), causing hard to find memory leaks.
# Expected
I had assumed that the lru_cache would keep weak-references and that when an object is garbage colected, all its cache entries expire as unreachable. This is not the case.
# Solutions
1. I think it is worth at least mentioning this behavior in de documentation.
2. I also think it would be good if the LRU cache actually uses weak references.
I will try to make a PR for this. |
|
Date |
User |
Action |
Args |
2021-06-04 11:45:58 | Wouter De Borger2 | set | recipients:
+ Wouter De Borger2 |
2021-06-04 11:45:58 | Wouter De Borger2 | set | messageid: <1622807158.12.0.225505300643.issue44310@roundup.psfhosted.org> |
2021-06-04 11:45:58 | Wouter De Borger2 | link | issue44310 messages |
2021-06-04 11:45:57 | Wouter De Borger2 | create | |
|