mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 01:09:44 +00:00
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:
parent
91580ce321
commit
9f09dc3dd7
@ -2346,6 +2346,11 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener,
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function __destruct(){
|
||||||
|
parent::__destruct();
|
||||||
|
$this->logger->debug("Destroyed by garbage collector");
|
||||||
|
}
|
||||||
|
|
||||||
public function canSaveWithChunk() : bool{
|
public function canSaveWithChunk() : bool{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user