Added weak reverse references from all handlers.

This commit is contained in:
Griatch 2014-05-10 17:12:49 +02:00
parent 4e3789cede
commit 0030530021
6 changed files with 20 additions and 22 deletions

View file

@ -1052,7 +1052,7 @@ class LazyLoadHandler(object):
Initialize handler as cls(obj, *args)
"""
obj = _GA(self, "obj")()
instance = _GA(self, "cls")(obj, *_GA(self, "args"))
instance = _GA(self, "cls")(weakref.proxy(obj), *_GA(self, "args"))
_SA(obj, _GA(self, "name"), instance)
return instance