AsyncTask: Remove cleanObject() and calls to it

This is no longer needed. Doing worker GC (via collect()) frees the allocated memory anyway, so this function is now redundant.
This commit is contained in:
Dylan K. Taylor 2018-01-30 16:45:49 +00:00
parent 9014eb72e9
commit 18b287c3ea
2 changed files with 0 additions and 12 deletions

View File

@ -120,8 +120,6 @@ class AsyncPool{
unset($this->tasks[$task->getTaskId()]);
unset($this->taskWorkers[$task->getTaskId()]);
$task->cleanObject();
}
public function removeTasks(){

View File

@ -291,15 +291,5 @@ abstract class AsyncTask extends Collectable{
return $server->getScheduler()->peekLocalComplex($this);
}
public function cleanObject(){
foreach($this as $p => $v){
if(!($v instanceof \Threaded)){
$this->{$p} = null;
}
}
$this->setGarbage();
}
}