mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-17 12:12:10 -04:00
auto-destroy
This commit is contained in:
parent
7aa8c050f9
commit
3fcd37e21c
@ -31,8 +31,9 @@ class BulletinBoardWatcher(DirectObject.DirectObject):
|
||||
|
||||
def destroy(self):
|
||||
self.ignoreAll()
|
||||
del self.callback
|
||||
del self.waitingOn
|
||||
if hasattr(self, 'callback'):
|
||||
del self.callback
|
||||
del self.waitingOn
|
||||
|
||||
def isDone(self):
|
||||
return len(self.waitingOn) == 0
|
||||
@ -41,6 +42,7 @@ class BulletinBoardWatcher(DirectObject.DirectObject):
|
||||
if self.isDone():
|
||||
self.notify.debug('%s: done' % self.name)
|
||||
self.callback()
|
||||
self.destroy()
|
||||
|
||||
def _handleEvent(self, eventName):
|
||||
self.notify.debug('%s: handlePost(%s)' % (self.name, eventName))
|
||||
|
Loading…
x
Reference in New Issue
Block a user