GarbageCollectorManager
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() : intgetThreshold()
php
public function getThreshold() : intmaybeCollectCycles()
php
public function maybeCollectCycles() : int