diff --git a/direct/src/distributed/CRCache.py b/direct/src/distributed/CRCache.py index ddd5fc0bfc..2123b834d0 100644 --- a/direct/src/distributed/CRCache.py +++ b/direct/src/distributed/CRCache.py @@ -22,6 +22,10 @@ class CRCache: CRCache.notify.debug("Flushing the cache") for distObj in self.dict.values(): distObj.deleteOrDelay() + if distObj.getDelayDeleteCount() != 0: + self.notify.warning( + 'CRCache.flush: could not delete %s (%s), delayDeleteCount=%s' % + (safeRepr(distObj), itype(distObj), distObj.getDelayDeleteCount())) # Null out all references to the objects so they will get gcd self.dict = {} self.fifo = [] diff --git a/direct/src/distributed/DistributedObject.py b/direct/src/distributed/DistributedObject.py index 8d9519ac46..6667422102 100644 --- a/direct/src/distributed/DistributedObject.py +++ b/direct/src/distributed/DistributedObject.py @@ -148,6 +148,9 @@ class DistributedObject(DistributedObjectBase): else: self.disableAnnounceAndDelete() + def getDelayDeleteCount(self): + return self.delayDeleteCount + def delayDelete(self, flag): # Flag should be 0 or 1, meaning increment or decrement count # Also see DelayDelete.py