Unregister an object from the context manager.

@param object Object to unregister.
341238
@Override
    public void unregisterObject(Object object) {
        if (object instanceof IContextEvent) {
            for (IManagedContext<?> managedContext : managedContexts) {
                managedContext.removeSubscriber((IContextEvent) object);
            }
        }

        if (object instanceof IManagedContext) {
            managedContexts.remove(object);
        }
    }
15725
public synchronized void unregisterThrow(ObjectName objName) throws JMException {
		if (mbeanServer == null) {
			throw new JMException("JmxServer has not be started");
		}
		mbeanServer.unregisterMBean(objName);
		registeredCount--;
	}
475447
private synchronized void unregisterAllSimons() {
		Iterator<String> namesIter = registeredNames.iterator();
		while (namesIter.hasNext()) {
			String name = namesIter.next();
			try {
				ObjectName objectName = new ObjectName(name);
				mBeanServer.unregisterMBean(objectName);
				// I have to use iterator.remove() - hence no common method for clearManager() and simonDestroyed(simon)
				namesIter.remove();
				onManagerMessage("Unregistered Simon with the name: " + objectName);
			} catch (JMException e) {
				onManagerWarning("JMX unregistration failed for: " + name, e);
			}
		}
	}
24080
public function unregisterModel(PortableElementObject $object){
        $registry = $object->getModel()->getRegistry();
        $registry->delete($object);
        return true;
    }
751244
@Override
	public boolean remove(Object object) {
		if (booleanTerms == null) {
			return false;
		}
		return booleanTerms.remove(object);
	}
221473
ServerSessionManager unregisterConnection(Connection connection) {
    Iterator<Map.Entry<String, Connection>> iterator = connections.entrySet().iterator();
    while (iterator.hasNext()) {
      Map.Entry<String, Connection> entry = iterator.next();
      if (entry.getValue().equals(connection)) {
        ServerSessionContext session = clients.get(entry.getKey());
        if (session != null) {
          session.setConnection(null);
        }
        iterator.remove();
      }
    }
    return this;
  }
587429
private void remove(Class<?> type, Object object)
    {
        final Set<?> set = items.get(type);
        if (set != null)
        {
            set.remove(object);
        }
    }
1110391
public static void unsubscribe(Object object) throws IllegalStateException {
        if (!sIsInitialized) {
            throw new IllegalStateException("Wings must be initialized. See Wings#init().");
        }
        WingsInjector.getBus().unregister(object);
    }
1337138
public synchronized void unregisterThrow(Object obj) throws JMException {
		if (obj instanceof PublishAllBeanWrapper) {
			unregisterThrow(ObjectNameUtil.makeObjectName(((PublishAllBeanWrapper) obj).getJmxResourceInfo()));
		} else {
			unregisterThrow(ObjectNameUtil.makeObjectName(obj));
		}
	}
386344
public static void unregisterCacheObject(String cacheManagerName, String name, boolean stats) {
        synchronized (mBeanServer) {
            ObjectName objectName = calculateObjectName(cacheManagerName, name, stats);
            Set<ObjectName> registeredObjectNames = mBeanServer.queryNames(objectName, null);
            if (isRegistered(cacheManagerName, name, stats)) {
                //should just be one
                for (ObjectName registeredObjectName : registeredObjectNames) {
                    try {
                        mBeanServer.unregisterMBean(registeredObjectName);
                    } catch (InstanceNotFoundException e) {
                        // it can happen that the instance that we want to unregister isn't found. So lets ignore it
                        // https://github.com/hazelcast/hazelcast/issues/11055
                        ignore(e);
                    } catch (Exception e) {
                        throw new CacheException("Error unregistering object instance " + registeredObjectName
                                + ". Error was " + e.getMessage(), e);
                    }
                }
            }
        }
    }
715458
public void register(BeanMappingObject object) {
        BeanMappingObject old = null;
        String name = null;
        if (object != null) {
            if (StringUtils.isEmpty(object.getName())) {
                name = mapperObjectName(object.getSrcClass(), object.getTargetClass());
            } else {
                name = object.getName();
            }

            old = mappings.put(name, object);
        }

        if (old != null) {
            logger.warn("{} has been replaced by : {}", name, object.toString());
        }
    }
1050053
public void deleteObject(Object object)
    {
        PersistenceBroker broker = null;
        try
        {
            broker = getBroker();
            broker.delete(object);
        }
        finally
        {
            if (broker != null) broker.close();
        }
    }
761276
public static void unregisterObject(String id, Object obj) {
    DefaultMonitorRegistry.getInstance().unregister(newObjectMonitor(id, obj));
  }
73018
int remove(T object) {
        int positionOfRemove = mObjects.indexOf(object);
        if (positionOfRemove >= 0) {
            T objectRemoved = removeAt(positionOfRemove);
            if (objectRemoved != null) {
                return positionOfRemove;
            }
        }
        return -1;
    }
317799
public function offsetUnset($object)
       {
            if (parent::contains($object)) {
                parent::offsetUnset($object);
                $index = array_search(spl_object_hash($object), $this->map, true);
                unset($this->map[$index]);
            }
       }
1096715
@Override
  public void unregister(Monitor<?> monitor) {
    Preconditions.checkNotNull(monitor, "monitor");
    try {
      monitors.remove(monitor);
    } catch (Exception e) {
      throw new IllegalArgumentException("invalid object", e);
    }
  }
656097
function unregister() {
    if (!applicationCurrent) {
        return;
    }
    applicationCurrent.stop();

    EVENTS.forEach(function (event) {
        process.removeListener(event, currentHandlers[event]);
    });

    applicationCurrent = null;
    currentHandlers = {};
}