mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-09 11:16:57 +00:00
Fixed entity visibility Player object memory leak, close #416
This commit is contained in:
@ -3100,6 +3100,9 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
||||
foreach($this->usedChunks as $index => $d){
|
||||
Level::getXZ($index, $chunkX, $chunkZ);
|
||||
$this->level->unregisterChunkLoader($this, $chunkX, $chunkZ);
|
||||
foreach($this->level->getChunkEntities($chunkX, $chunkZ) as $entity){
|
||||
$entity->despawnFrom($this, false);
|
||||
}
|
||||
unset($this->usedChunks[$index]);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user