@Override
    public void disableMemoryUsageMetrics() {
        for (ConcurrentMap.Entry<Object, ObjectMetric> entry : registeredObjects.entrySet()) {
            metricRegistry.remove(entry.getValue().getName());
        }
    }
Register the object that needs to be measured the memory usage

@param object Object
@param name   An unique value to identify the object.
modules/siddhi-core/src/main/java/io/siddhi/core/util/statistics/metrics/SiddhiMemoryUsageMetric.java