Re:Tracking Down a Python Memory Leak
by dom0 on Wednesday December 07, 2016 @07:08PM
(#13127399)
> Weak references are the right way to deal with cache objects, imho.
Yet, I disagree ;) Whether a weakref is the correct thing to use or not depends entirely on the purpose of the cache. I often find myself using caches were weakref would not be very useful, because it would cool the cache a lot.
Yet, I disagree ;) Whether a weakref is the correct thing to use or not depends entirely on the purpose of the cache. I often find myself using caches were weakref would not be very useful, because it would cool the cache a lot.