This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients gvanrossum, josh.r, levkivskyi, ned.deily, serhiy.storchaka, yselivanov
Date 2016-11-09.18:52:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> 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.

test_typing leaked [3125, 3089, 2897] references, sum=9111
test_typing leaked [1189, 1179, 1103] memory blocks, sum=3471

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:57serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, ned.deily, yselivanov, josh.r, levkivskyi
2016-11-09 18:52:57serhiy.storchakasetmessageid: <>
2016-11-09 18:52:57serhiy.storchakalinkissue28649 messages
2016-11-09 18:52:57serhiy.storchakacreate