mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Guard against leaked closed tiles leaking chunks and NBT trees
Once again, this does not fix the actual issue, only reduces the impact of it.
This commit is contained in:
parent
fa5e66478c
commit
cbb003bf29
@ -173,11 +173,14 @@ abstract class Tile extends Position{
|
||||
unset($this->level->updateTiles[$this->id]);
|
||||
if($this->chunk instanceof Chunk){
|
||||
$this->chunk->removeTile($this);
|
||||
$this->chunk = null;
|
||||
}
|
||||
if(($level = $this->getLevel()) instanceof Level){
|
||||
$level->removeTile($this);
|
||||
$this->setLevel(null);
|
||||
}
|
||||
$this->level = null;
|
||||
|
||||
$this->namedtag = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user