mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 16:51:42 +00:00
Living: fixed cycle between armor inventory and holder not getting cleaned up on close
this was getting collected by the cycle GC, but it should have been dealt with properly like other inventories.
This commit is contained in:
parent
2a09aaf456
commit
e024f381c9
@ -809,4 +809,14 @@ abstract class Living extends Entity implements Damageable{
|
||||
|
||||
$this->armorInventory->sendContents($player);
|
||||
}
|
||||
|
||||
public function close(){
|
||||
if(!$this->closed){
|
||||
if($this->armorInventory !== null){
|
||||
$this->armorInventory->removeAllViewers(true);
|
||||
$this->armorInventory = null;
|
||||
}
|
||||
parent::close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user