mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 16:45:13 +00:00
Player: Explicitly clear permission recalculation callbacks
this is necessary to get rid of the broadcast permission callbacks, which retain references to the Player itself, forming a cycle which would prevent PermissibleBase->__destruct() from cleaning up.
This commit is contained in:
@ -2006,6 +2006,8 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
$this->removeCurrentWindow();
|
||||
$this->removePermanentInventories();
|
||||
|
||||
$this->perm->getPermissionRecalculationCallbacks()->clear();
|
||||
|
||||
$this->flagForDespawn();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user