ConsoleCommandSender: ensure that PermissibleBase doesn't leak

if recalculatePermissions() was called, the PermissionManager will reference it, preventing it from being GC'd.
This commit is contained in:
Dylan K. Taylor 2021-04-11 17:21:29 +01:00
parent 66622defae
commit e720c001a9
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -87,4 +87,9 @@ class ConsoleCommandSender implements CommandSender{
} }
$this->lineHeight = $height; $this->lineHeight = $height;
} }
public function __destruct(){
//permission subscriptions need to be cleaned up explicitly
$this->perm->destroyCycles();
}
} }