mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
added warning about objects that are delayDeleted and cannot be deleted by the CRCache
This commit is contained in:
parent
b481bcac00
commit
6de182f3bf
@ -22,6 +22,10 @@ class CRCache:
|
|||||||
CRCache.notify.debug("Flushing the cache")
|
CRCache.notify.debug("Flushing the cache")
|
||||||
for distObj in self.dict.values():
|
for distObj in self.dict.values():
|
||||||
distObj.deleteOrDelay()
|
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
|
# Null out all references to the objects so they will get gcd
|
||||||
self.dict = {}
|
self.dict = {}
|
||||||
self.fifo = []
|
self.fifo = []
|
||||||
|
@ -148,6 +148,9 @@ class DistributedObject(DistributedObjectBase):
|
|||||||
else:
|
else:
|
||||||
self.disableAnnounceAndDelete()
|
self.disableAnnounceAndDelete()
|
||||||
|
|
||||||
|
def getDelayDeleteCount(self):
|
||||||
|
return self.delayDeleteCount
|
||||||
|
|
||||||
def delayDelete(self, flag):
|
def delayDelete(self, flag):
|
||||||
# Flag should be 0 or 1, meaning increment or decrement count
|
# Flag should be 0 or 1, meaning increment or decrement count
|
||||||
# Also see DelayDelete.py
|
# Also see DelayDelete.py
|
||||||
|
Loading…
x
Reference in New Issue
Block a user