Respond to MBeans being removed.

@param obj The name of the MBean being removed.
341708
private synchronized void onRemovedMbean(ObjectName obj) {
        if (!detected_groups_.keySet().contains(obj)) {
            LOG.log(Level.WARNING, "skipping de-registration of {0}: not present", obj);
            return;
        }

        MBeanGroup instance = detected_groups_.get(obj);
        detected_groups_.remove(obj);
        LOG.log(Level.FINE, "de-registered metrics for {0}: {1}", new Object[]{obj, instance});
    }
610186
function (obj) {
            var index;
            if (this.validate(obj) && this.count <= this.__maxObjects && (index = this.__inUseObjects.indexOf(obj)) > -1) {
                this.__freeObjects.enqueue(obj);
                this.__inUseObjects.splice(index, 1);
            } else {
                this.removeObject(obj);
            }
        }
274436
@Override
    public void handleNotification(Notification notification, Object handback) {
        if(notification instanceof MBeanServerNotification) {
            MBeanServerNotification mbeanNotification = (MBeanServerNotification) notification;
            if(mbeanNotification.getType().equals("JMX.mbean.registered")) {
                jmxTree = null;
               
               registerAsNotificationListener(mbeanNotification.getMBeanName());
                
            } else if(mbeanNotification.getType().equals("JMX.mbean.unregistered")) {
                jmxTree = null;
            }
        } 
        for (NotificationListener listener : listeners) {
            listener.handleNotification(notification, handback);
        }

    }
1307987
public void setObject(Object obj) {
		this.checkNull(obj);
		this.list.add(obj);
		this.type.add(Object.class);
	}
579322
function(obj) {
    if (!_.isObject(obj)) { return; }
    
    if (hasKeyPath(obj, ['options', 'reconfigureOverrides'])) {
      delete obj.options.reconfigureOverrides;
    } else {
      for (var key in obj) {
        if (!_.isObject(obj[key])) { continue; }
        cleanupOverrides(obj[key]);
      }
    }
  }
1265552
@Override
    public void delete(ZooPC obj) {
    	if (obj.getClass() == GenericObject.class) {
    		throw new IllegalArgumentException();
//    		deleteGeneric((GenericObject) obj);
//    		return;
    	}
    	
        if (!isStarted) {
            this.sie = node.getSchemaIE(cls);
            isStarted = true;
        }

        //updated index
        //This is buffered to reduce look-ups to find field indices.
        buffer[bufferCnt++] = obj;
        if (bufferCnt == BUFFER_SIZE) {
            flushBuffer();
        }
    }
638625
@SuppressWarnings("unchecked")
    public void finish(final Object obj) {
        finish(request.getJsonConvert(), (Type) null, obj);
    }
767743
@Override
	public final void unregister( ObjectName name ) throws JMSException
	{
	    log.debug("Unregistering object "+name);
	    try
	    {
	        this.mBeanServer.unregisterMBean(name);
	    }
	    catch (Exception e)
	    {
	        throw new FFMQException("Cannot unregister MBean","JMX_ERROR",e);
	    }
	}
547266
public static JsonNode remove(ObjectNode obj, String fieldName) {
		JsonNode result = null;
		if (obj != null) {
			result = obj.remove(fieldName);
		}
		return result;
	}
320528
public void add(final Object obj) {
		final Class<?> clazz = obj.getClass();

		if (this.clazzes.contains(clazz)) {
			throw new IllegalArgumentException(
					"Only one class-instance per benchmark allowed");
		} else {
			this.clazzes.add(clazz);
			this.objects.add(obj);
		}
	}
1241757
public static void unregister(MBeanServer server, String object_name) throws Exception {
        Set<ObjectName> mbeans = server.queryNames(new ObjectName(object_name), null);
        if(mbeans != null)
            for (ObjectName name: mbeans)
                server.unregisterMBean(name);
    }
1252554
public void postDeregister()
    {
        _httpServer.removeEventListener(this);
        _httpServer=null;
        if (_mbeanMap!=null)
            _mbeanMap.clear();
        _mbeanMap=null;
        
        super.postDeregister();
    }
767109
function (obj) {
            var self = this;
            this.validate(obj).chain(function (valid) {
                var index;
                if (self.count <= self.__maxObjects && valid && (index = self.__inUseObjects.indexOf(obj)) > -1) {
                    self.__inUseObjects.splice(index, 1);
                    self.__freeObjects.enqueue(obj);
                    self.__checkQueries();
                } else {
                    self.removeObject(obj);
                }
            });
        }
1219428
public function destroy($obj): void
    {
        // del metadata
        $id = $this->genID($obj);

        if (isset($this->metas[$id])) {
            unset($this->metas[$id]);
        }

        $obj = null;
    }
51259
@Override
    public void visitCode(Code obj) {
        stack.resetForMethodEntry(this);
        lastOpcode = -1;
        lastReg = -1;
        lastIfEqWasBoolean = false;
        lastLoadWasString = false;
        Arrays.fill(lastPCs, -1);
        branchTargets.clear();
        trimLocations.clear();
        super.visitCode(obj);
    }
99939
public void deregister() {
		if(objectName == null) {
			return;
		}
		
		try {
			MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
			if (mbs.isRegistered(objectName)) {
				mbs.unregisterMBean(objectName);
			}
			objectName = null;
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
	}
172136
public void remove(V value) {
		int index = values.indexOf(value);
		values.remove(value);
		
		if (value instanceof JsonEntity) {
			((JsonEntity)value).removePropertyChangeListener(propListener);
		}
		
		firePropertyChange("#" + index, value, null);
	}