mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-13 13:25:16 +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]);
|
unset($this->level->updateTiles[$this->id]);
|
||||||
if($this->chunk instanceof Chunk){
|
if($this->chunk instanceof Chunk){
|
||||||
$this->chunk->removeTile($this);
|
$this->chunk->removeTile($this);
|
||||||
|
$this->chunk = null;
|
||||||
}
|
}
|
||||||
if(($level = $this->getLevel()) instanceof Level){
|
if(($level = $this->getLevel()) instanceof Level){
|
||||||
$level->removeTile($this);
|
$level->removeTile($this);
|
||||||
|
$this->setLevel(null);
|
||||||
}
|
}
|
||||||
$this->level = null;
|
|
||||||
|
$this->namedtag = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user