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

@ -78,6 +78,11 @@ abstract class BaseInventory implements Inventory{
$this->setContents($items);
}
public function __destruct(){
$this->holder = null;
$this->slots = [];
}
public function getSize(){
return $this->size;
}