code: public void close() {
  		synchronized (this) {
  			if (!closed) {
  				closed = true;
  
  				// close all subgroups
  				for (AbstractMetricGroup group : groups.values()) {
  					group.close();
  				}
  				groups.clear();
  
  				// un-register all directly contained metrics
  				for (Map.Entry<String, Metric> metric : metrics.entrySet()) {
  					registry.unregister(metric.getValue(), metric.getKey(), this);
  				}
  				metrics.clear();
  			}
  		}
  	}
docs: ------------------------------------------------------------------------