Browse Source

clean up doLater task

Darren Ranalli 17 years ago
parent
commit
2d8e530230
1 changed files with 3 additions and 1 deletions
  1. 3 1
      direct/src/task/Task.py

+ 3 - 1
direct/src/task/Task.py

@@ -424,7 +424,7 @@ class TaskManager:
         self.nameDict = {}
 
         # A default task.
-        self.add(self.__doLaterProcessor, "doLaterProcessor", -10)
+        self._doLaterTask = self.add(self.__doLaterProcessor, "doLaterProcessor", -10)
 
         # start this when config is available
         self._gcTask = None
@@ -433,6 +433,8 @@ class TaskManager:
     def destroy(self):
         if self._gcTask:
             self._gcTask.remove()
+        if self._doLaterTask:
+            self._doLaterTask.remove()
         if self._taskProfiler:
             self._taskProfiler.destroy()
         del self.nameDict