[Process] Unset callback after stop to free memory
This commit is contained in:
parent
fbc353dcda
commit
ec93b9a7f7
@ -1136,6 +1136,11 @@ class Process
|
||||
$this->exitcode = 128 + $this->processInformation['termsig'];
|
||||
}
|
||||
|
||||
// Free memory from self-reference callback created by buildCallback
|
||||
// Doing so in other contexts like __destruct or by garbage collector is ineffective
|
||||
// Now pipes are closed, so the callback is no longer necessary
|
||||
$this->callback = null;
|
||||
|
||||
return $this->exitcode;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user