Browse Source

One more in lru_cache.

Jelmer Vernooij 2 years ago
parent
commit
ea8fcb760c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      dulwich/lru_cache.py

+ 2 - 2
dulwich/lru_cache.py

@@ -63,12 +63,12 @@ class _LRUNode(Generic[K, V]):
             prev_key,
         )
 
-    def run_cleanup(self):
+    def run_cleanup(self) -> None:
         if self.cleanup is not None:
             self.cleanup(self.key, self.value)
         self.cleanup = None
         # Just make sure to break any refcycles, etc
-        self.value = None
+        del self.value
 
 
 class LRUCache(Generic[K, V]):