[Python-Dev] refleaks and caches

Phillip J. Eby pje at telecommunity.com
Sun Jan 27 21:02:01 CET 2008


At 05:05 PM 1/26/2008 -0800, Neal Norwitz wrote:
>Around Jan 13, the refleak hunting test that is reported on
>python-checkins started to report refleaks on virtually every run.  I
>suspect this is due to r59944 (at 2008-01-13 16:29:41) which was from
>patch #1700288 to cache methods.  With this patch it makes it much
>harder to spot refleaks.  Does anyone have ideas how to fix it?  The
>only one I have is to disable the cache with a special flag, env't
>variable, sys variable/function or the like.  We could make this
>available only in debug mode.  The cache should normally be enabled,
>but could be disabled solely on the refleak runs.
>
>Suggestions?

Expose an API to clear the cache, and clear it at shutdown?  It 
should probably be part of interpreter shutdown anyway.



More information about the Python-Dev mailing list