Remove the NamedAdminObjectServiceInfo from {@link #adminObjectServices} if
it is no longer needed.

<p>Caller must hold a lock on this object.
349561
private void cleanupAdminObjectServiceInfo(NamedAdminObjectServiceInfo aosInfo) {
        if (aosInfo.serviceRef == null && aosInfo.endpointFactories.isEmpty()) {
            endpointActivationServices.remove(aosInfo.id);
        }
    }
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);
		}
	}
179219
public void removeLockedObject() {
        if (this != _resourceLocks._root && !this.getPath().equals("/")) {

            int size = _parent._children.length;
            for (int i = 0; i < size; i++) {
                if (_parent._children[i].equals(this)) {
                    LockedObject[] newChildren = new LockedObject[size - 1];
                    for (int i2 = 0; i2 < (size - 1); i2++) {
                        if (i2 < i) {
                            newChildren[i2] = _parent._children[i2];
                        } else {
                            newChildren[i2] = _parent._children[i2 + 1];
                        }
                    }
                    if (newChildren.length != 0) {
                        _parent._children = newChildren;
                    } else {
                        _parent._children = null;
                    }
                    break;
                }
            }

            // removing from hashtable
            _resourceLocks._locksByID.remove(getID());
            _resourceLocks._locks.remove(getPath());

            // now the garbage collector has some work to do
        }
    }
775130
void removeHandler( Object handlerRegistration )
	{
		// Through object's interface implementation
		if( handlerRegistration instanceof DirectHandlerInfo )
		{
			DirectHandlerInfo info = (DirectHandlerInfo) handlerRegistration;
			info.source.removePropertyChangedHandler( info.registrationObject );
			return;
		}
		
		if( ! ( handlerRegistration instanceof HandlerInfo ) )
			return;
		
		HandlerInfo info = (HandlerInfo) handlerRegistration;
	
		HashMap<String, ArrayList<PropertyChangedHandler>> handlersMap = PlatformSpecificProvider.get().getObjectMetadata( info.source );
		if( handlersMap == null )
			return;
	
		ArrayList<PropertyChangedHandler> handlerList = handlersMap.get( info.propertyName );
		if( handlerList == null )
			return;
	
		handlerList.remove( info.handler );
	
		if( handlerList.isEmpty() )
			handlersMap.remove( info.propertyName );
	
		if( handlersMap.isEmpty() )
			PlatformSpecificProvider.get().setObjectMetadata( info.source, null );
		
		stats.statsRemovedRegistration( info );
	
		info.handler = null;
		info.propertyName = null;
		info.source = null;
	}
189060
public Object removeControlledObject(Authorizable object) {
        Object removed = null;

        for( Iterator iter = controlledObjects.iterator(); iter.hasNext(); ) {
            WeakReference ref = (WeakReference) iter.next();

            Authorizable controlledObject = (Authorizable) ref.get();
            if( controlledObject == null ) {
                // Has been GCed, remove from our list
                iter.remove();
            } else if( controlledObject.equals( object ) ) {
                removed = controlledObject;
                iter.remove();
            }
        }
        return removed;
    }
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);
			}
		}
	}
722898
public static void removeAllThreadIdentityServices() {
        threadIdentityServices.clear();
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "All the ThreadIdentityService implementations were removed.");
        }
    }
972077
void removeManager(CacheManager cm) {
    synchronized (getLockObject()) {
      Map<String, CacheManager> _name2managers = loader2name2manager.get(cm.getClassLoader());
      _name2managers = new HashMap<String, CacheManager>(_name2managers);
      Object _removed = _name2managers.remove(cm.getName());
      Map<ClassLoader, Map<String, CacheManager>> _copy = new WeakHashMap<ClassLoader, Map<String, CacheManager>>(loader2name2manager);
      _copy.put(cm.getClassLoader(), _name2managers);
      loader2name2manager = _copy;
      if (cm.isDefaultManager()) {
        Map<ClassLoader, String> _defaultNameCopy = new WeakHashMap<ClassLoader, String>(loader2defaultName);
        _defaultNameCopy.remove(cm.getClassLoader());
        loader2defaultName = _defaultNameCopy;
      }
    }
  }
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);
        }
    }
278328
protected void releaseObjects() {
        Log.d(TAG, "releaseObjects");
        if (this.mediaPlayer != null) {
            this.mediaPlayer.setSurface(null);
            this.mediaPlayer.reset();
        }

        this.videoIsReady = false;
        this.surfaceIsReady = false;
        this.initialMovieHeight = -1;
        this.initialMovieWidth = -1;

        if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
            if (this.textureView != null) {
                this.textureView.setSurfaceTextureListener(null);
                removeView(this.textureView);
                this.textureView = null;
            }
        } else {
            if (this.surfaceHolder != null) {
                this.surfaceHolder.removeCallback(this);
                this.surfaceHolder = null;
            }
            if (this.surfaceView != null) {
                removeView(this.surfaceView);
                this.surfaceView = null;
            }
        }

        if (this.onProgressView != null) {
            removeView(this.onProgressView);
        }
    }
577931
public void removeTempLockedObject() {
        if (this != resourceLocks.tempRoot) {
            // removing from tree
            if (parent != null && parent.children != null) {
                int size = parent.children.length;
                for (int i = 0; i < size; i++) {
                    if (parent.children[i].equals(this)) {
                        LockedObject[] newChildren = new LockedObject[size - 1];
                        for (int i2 = 0; i2 < (size - 1); i2++) {
                            if (i2 < i) {
                                newChildren[i2] = parent.children[i2];
                            } else {
                                newChildren[i2] = parent.children[i2 + 1];
                            }
                        }
                        if (newChildren.length != 0) {
                            parent.children = newChildren;
                        } else {
                            parent.children = null;
                        }
                        break;
                    }
                }

                // removing from hashtable
                resourceLocks.tempLocksByID.remove(getID());
                resourceLocks.tempLocks.remove(getPath());

                // now the garbage collector has some work to do
            }
        }
    }
371165
protected synchronized void lock(ManagedObject managedObject)
                    throws ObjectManagerException
    {
        throw new InvalidStateException(this, InternalTransaction.stateTerminated, InternalTransaction.stateNames[InternalTransaction.stateTerminated]);
    }
918261
void revokeDbObject(HsqlName name) {

        directRightsMap.remove(name);
        grantedRightsMap.remove(name);
        fullRightsMap.remove(name);
    }
272688
protected void unsetMonitor(ServiceReference<FileMonitor> monitorRef) {
        MonitorHolder holder = fileMonitors.remove(monitorRef);

        if (holder != null) {
            holder.destroy();
        }
    }
552674
@Override
    public void removeObserver(final Observer<S, T> observer) {
        synchronized (OBSERVER_LOCK) {
            observers.remove(observer);
        }
    }
509261
protected Map<String, Object> unsetUserRegistry(ServiceReference<UserRegistryService> ref) {
        userRegistry.removeReference((String) ref.getProperty(KEY_ID), ref);
        userRegistry.removeReference(String.valueOf(ref.getProperty(KEY_SERVICE_ID)), ref);

        // determine a new user registry service
        userRegistryService.set(null);
        return getServiceProperties();
    }
43486
protected void removeStartedApplication(ServiceReference<Application> ref) {
        String appName = (String) ref.getProperty(NAME);
        lock.writeLock().lock();
        try {
            appStates.remove(appName);
        } finally {
            lock.writeLock().unlock();
        }
    }