summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2016-08-10 21:11:03 +0300
committerLars Wirzenius <liw@liw.fi>2016-08-11 09:28:24 +0300
commita81c0c81e9e6bf64477d4751adb15d9dd26820b2 (patch)
tree3fef4c0031566cd692fe04a0e9c2d97b30511731
parent30208a498081106218c136563997d0f57378bcb3 (diff)
downloadobnam-a81c0c81e9e6bf64477d4751adb15d9dd26820b2.tar.gz
Log BlobCache object lifetimes
-rw-r--r--obnamlib/blob_store.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/obnamlib/blob_store.py b/obnamlib/blob_store.py
index 219e585a..68f31c69 100644
--- a/obnamlib/blob_store.py
+++ b/obnamlib/blob_store.py
@@ -86,9 +86,13 @@ class BlobStore(object):
class BlobCache(object):
def __init__(self):
+ obnamlib.object_created(self)
self._max_bytes = None
self._clear()
+ def __del__(self):
+ obnamlib.object_deleted(self, self._cache)
+
def _clear(self):
self._cache = {}
self._cache_size = 0