There is a memory leak in TP#preregistered_probe_handlers when enable_diagnostics is false.
TP#registerProbeHandler stores ProbeHandlers in the preregistered_probe_handlers list if diag_handler is null (either because TP has not been started, or enable_diagnostics is false).
When TP is started, if enable_diagnostics is true it copies them to the diag_handler and clears out preregistered_probe_handlers.
But if enable_diagnostics is false, preregistered_probe_handlers will never get cleared.
This prevents anything that registered a probe handler from being GC'd. For example with a shared JGroups transport like EAP uses, this can cause an Infinispan CacheManager that has been stopped to never get GC'd.
(This issue was noticed because of a buildup of DefaultCacheManager instances in a heap dump after an application had been redeployed a few times).