- **status**: review --> closed


---

** [tickets:#8314] @memoize on methods should still allow garbage collection**

**Status:** closed
**Milestone:** unreleased
**Created:** Wed Jul 03, 2019 08:14 PM UTC by Dave Brondsema
**Last Updated:** Wed Jul 03, 2019 09:32 PM UTC
**Owner:** Dave Brondsema


Our `@memoize` works pretty similarly to `@lru_cache` and doesn't do what you 
might expect on a method (as opposed to a simple function).  It creates a 
global class-level cache with `self` as one of the args and thus the `self` 
object is referenced forever and cannot be garbage collected.  
https://bugs.python.org/issue19859 describes the situation


---

Sent from forge-allura.apache.org because dev@allura.apache.org is subscribed 
to https://forge-allura.apache.org/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://forge-allura.apache.org/p/allura/admin/tickets/options.  Or, if this is 
a mailing list, you can unsubscribe from the mailing list.

Reply via email to