Player: Log a debug message when GC kicks in

I use this frequently to identify leaks. This isn't expected to appear immediately after disconnect, but it shouldn't take long to appear.
This commit is contained in:
Dylan K. Taylor 2019-06-24 17:46:30 +01:00
parent 91580ce321
commit 9f09dc3dd7

View File

@ -2346,6 +2346,11 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener,
return [];
}
public function __destruct(){
parent::__destruct();
$this->logger->debug("Destroyed by garbage collector");
}
public function canSaveWithChunk() : bool{
return false;
}