public ManagedResource cleanupRegionResources(String regionPath) {
    ManagedResource cleaned = null;

    synchronized (managedRegionResourcesMap) {
      Set<Entry<String, SystemMemberRegionJmxImpl>> entries = managedRegionResourcesMap.entrySet();
      for (Iterator<Entry<String, SystemMemberRegionJmxImpl>> it = entries.iterator(); it
          .hasNext();) {
        Entry<String, SystemMemberRegionJmxImpl> entry = it.next();
        SystemMemberRegionJmxImpl managedResource = entry.getValue();
        ObjectName objName = managedResource.getObjectName();

        String pathProp = objName.getKeyProperty("path");
        if (pathProp != null && pathProp.equals(regionPath)) {
          cleaned = managedResource;
          it.remove();

          break;
        }
      }
    }

    return cleaned;
  }
Cleans up managed resources created for the region that was (created and) destroyed in a cache
represented by this Managed Resource.

@param regionPath path of the region that got destroyed
@return a managed resource related to this region path
geode-core/src/main/java/org/apache/geode/admin/jmx/internal/SystemMemberCacheJmxImpl.java