diff --git a/src/pocketmine/scheduler/AsyncPool.php b/src/pocketmine/scheduler/AsyncPool.php index cd91319ed..8174b230c 100644 --- a/src/pocketmine/scheduler/AsyncPool.php +++ b/src/pocketmine/scheduler/AsyncPool.php @@ -248,6 +248,7 @@ class AsyncPool{ $this->workerUsage[$this->taskWorkers[$task->getTaskId()]]--; } + $task->removeDanglingStoredObjects(); unset($this->tasks[$task->getTaskId()]); unset($this->taskWorkers[$task->getTaskId()]); }