Came across this while implementing disablePersistentClient for
The internal HashTable for tracking persistent clients is initialized in GINIT; however, we free its clients and destroy the HashTable in MSHUTDOWN. This makes no difference for single-threaded PHP deployments (e.g. CLI, FPM), since GINIT and GSHUTDOWN are invoked once from MINIT and MSHUTDOWN, respectively; however, it could pose problems for threaded SAPIs (despite those being discouraged).
Since libmongoc clients should not be shared among threads, it does make sense to initialize the HashTable in GINIT and we should just ensure that the HashTable is destroyed during GSHUTDOWN to avoid potential leaks.