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:
Dylan K. Taylor 2021-06-26 17:17:47 +01:00
parent a6039ad733
commit 4a5bdefe8b
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -2006,6 +2006,8 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
$this->removeCurrentWindow();
$this->removePermanentInventories();
$this->perm->getPermissionRecalculationCallbacks()->clear();
$this->flagForDespawn();
}