Message280434
> Serhiy, why is `gc.collect()` returning 2 after `del A` proof of a leak?
Sorry, it was bad example. I don't remember all details.
> The problem is that functools.lru_cache is used in _tp_cache. If I remove type caching, the original "refleak" is fixed.
Proposed patch clears caches when search for reference leaks. This decreases the number of leaks.
Unpatched:
test_typing leaked [3125, 3089, 2897] references, sum=9111
test_typing leaked [1189, 1179, 1103] memory blocks, sum=3471
Patched:
test_typing leaked [125, 125, 125] references, sum=375
test_typing leaked [49, 51, 51] memory blocks, sum=151
See also issue23839. |
|
Date |
User |
Action |
Args |
2016-11-09 18:52:57 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, gvanrossum, ned.deily, yselivanov, josh.r, levkivskyi |
2016-11-09 18:52:57 | serhiy.storchaka | set | messageid: <1478717577.32.0.139477334282.issue28649@psf.upfronthosting.co.za> |
2016-11-09 18:52:57 | serhiy.storchaka | link | issue28649 messages |
2016-11-09 18:52:57 | serhiy.storchaka | create | |
|