Fix: Object cache was removing objects properly.
Continue to update test to use unittest.
This commit is contained in:
parent
a9370d933d
commit
badac267cc
2 changed files with 84 additions and 84 deletions
|
|
@ -128,8 +128,9 @@ class _ObjectCache(type):
|
|||
@staticmethod
|
||||
def forget(obj):
|
||||
objid = _core.PyCObjectVoidPtrToPyLong(obj.ptr)
|
||||
if objid in _ObjectCache.__instances:
|
||||
del _ObjectCache.__instances[objid]
|
||||
key = "%s:%d" % (type(obj).__name__, objid)
|
||||
if key in _ObjectCache.__instances:
|
||||
del _ObjectCache.__instances[key]
|
||||
|
||||
|
||||
#===----------------------------------------------------------------------===
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue