microprofile/health-smallrye/src/main/java/org/wildfly/extension/microprofile/health/deployment/CDIExtension.java
public void close(@Observes final BeforeShutdown bs) {
        healthCheckInstances.forEach(healthCheck -> {
            healthReporter.removeHealthCheck(healthCheck.get());
            healthCheck.preDestroy().dispose();
        });
        healthCheckInstances.clear();
    }
public void close(@Observes final BeforeShutdown bs) {
        healthCheckInstances.forEach(healthCheck -> {
            healthReporter.removeHealthCheck(healthCheck.get());
            healthCheck.preDestroy().dispose();
        });
        healthCheckInstances.clear();
    }
public void close ( @ Observes final BeforeShutdown bs ) { healthCheckInstances . forEach ( healthCheck -> { healthReporter . removeHealthCheck ( healthCheck . get ( ) ) ; healthCheck . preDestroy ( ) . dispose ( ) ; } ) ; healthCheckInstances . clear ( ) ; }
Called when the deployment is undeployed.

Remove all the instances of {@link HealthCheck} from the {@link SmallRyeHealthReporter}.
Handle manually their CDI destroy lifecycle.
Called when the deployment is undeployed .