Destroy cycles that reference player for faster collection

This commit is contained in:
Shoghi Cervantes
2015-06-19 13:31:29 +02:00
parent b166628940
commit f7e6246dc2
4 changed files with 31 additions and 14 deletions

View File

@ -2911,8 +2911,16 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
if($this->perm !== null){
$this->perm->clearPermissions();
$this->perm = null;
}
if($this->inventory !== null){
$this->inventory = null;
$this->currentTransaction = null;
}
$this->chunk = null;
$this->server->removePlayer($this);
}