Skip to content

GarbageCollectorManager ​

final class · pocketmine\GarbageCollectorManager · source

Allows threads to manually trigger the cyclic garbage collector using a threshold like PHP's own garbage collector, but triggered at a time that suits the thread instead of in random code pathways.

The GC trigger behaviour in this class was adapted from Zend/zend_gc.c as of PHP 8.3.14.

Methods ​

__construct() ​

php
public function __construct(\Logger $logger, ?\pocketmine\timings\TimingsHandler $parentTimings)

getCollectionTimeTotalNs() ​

php
public function getCollectionTimeTotalNs() : int

getThreshold() ​

php
public function getThreshold() : int

maybeCollectCycles() ​

php
public function maybeCollectCycles() : int

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.