not share registered objects between _Regitry objects (#1508)

This commit is contained in:
the-sea
2018-02-04 07:03:52 +08:00
committed by Eric Liang
parent 0a79442954
commit d0dd33e13c
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -77,8 +77,8 @@ def _from_pinnable(obj):
class _Registry(object):
def __init__(self, objs={}):
self._all_objects = objs
def __init__(self, objs=None):
self._all_objects = {} if objs is None else objs.copy()
self._refs = [] # hard refs that prevent eviction of objects
def register(self, category, key, value):