Disable this home instance and free all resources associated
with it.
978458
public synchronized void destroy()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
            Tr.event(tc, "Destroying home ", new Object[] { this, j2eeName });

        if (!enabled) {
            return;
        }

        // F743-1751 - Explicitly destroy singletons since they are not pooled.
        if (ivSingletonBeanO != null)
        {
            try
            {
                ivSingletonBeanO.destroy();
            } catch (Throwable ex)
            {
                FFDCFilter.processException(ex, CLASS_NAME + ".destroy", "809", this);
            }
        }

        if (beanPool != null) {
            beanPool.destroy();
        }

        enabled = false;

        if (pmiBean != null) {
            container.pmiFactory.removePmiModule(pmiBean); // d146239.14
        }
    }
381969
def disable(self):
        """"""
        with self._lock:
            if self._event_listener_thread is not None:
                self._event_listener_thread.stop()
                self._event_listener_thread = None
496345
public static synchronized void removeInstance() {
        if (instance != null) {
            instance.removeShutdownHook();
            instance.restoreOriginalSystemOutAndErr();
            if (instance.getReader() != null) {
                instance.getReader().shutdown();
            }
            instance = null;
        }
    }
482913
def deactivate(self):
        """"""
        if lib.EnvDeactivateRouter(self._env, self._name.encode()) == 0:
            raise RuntimeError("Unable to deactivate router %s" % self._name)
413625
def deallocate(self):
        """"""
        if self._domain is not None:
            domain_delete(self._domain, self.logger)
        if self._network is not None:
            self._network_delete()
        if self._storage_pool is not None:
            self._storage_pool_delete()
        if self._hypervisor is not None:
            self._hypervisor_delete()
634147
public void free()
    {
        if (BaseApplet.getSharedInstance() != null)
        	if (BaseApplet.getSharedInstance().getApplet() == null)
        		if (this.getParent() != null)
        			this.getParent().remove(this);      // Remove from frame
        if (this.getHelpView() != null)
        	this.getHelpView().free();
        this.freeSubComponents(this); // Free all the sub-screens.
    	if (m_recordOwnerCollection != null)
    		m_recordOwnerCollection.free();
    	m_recordOwnerCollection = null;
        boolean bEmptyTaskList = true;
        if (m_application != null)
        	bEmptyTaskList = m_application.removeTask(this);  // Remove this session from the list
        if (bEmptyTaskList)
            this.quit();
        if (Application.getRootApplet() == this)
        {
            Application.setRootApplet(null);
        	if (m_application.getTaskList() != null)
        	{
	            for (Task task : m_application.getTaskList().keySet())
	            {
	                if (task instanceof BaseApplet)
	                	Application.setRootApplet((BaseApplet)task);     // New main applet
	            }
        	}
        }
        m_application = null;
        if (bEmptyTaskList)
            if (gbStandAlone)
                if (ClassServiceUtility.getClassService().getClassFinder(null) == null)
                    System.exit(0); // Hack - Can't figure out how to get this to applet to quit every time.
    }
1295223
def deactivate(self):
        
        if not self._optional:
            self._optional = True

        self._activated = False
718936
public void free()
    {
        if (m_env != null)
        {
            m_env.removeApplication(this);
            m_env.freeIfDone();
        }
        
        super.free();

        if (m_databaseCollection != null)
            m_databaseCollection.free();
        m_databaseCollection = null;

        m_env = null;

        m_resources = null;
    }
804914
def destroy(self):
        """"""
        r = api.Resources(self.provider_conf.to_dict())
        # insert force_deploy
        r.destroy()
747576
public function cleanup(): void
    {
        foreach ($this->getStore() as $key => $value)
        {
            $this->remove($key);
        }
    }
408139
def destroy
      parent.lib.virtualbox.remove_dhcp_server(interface)
      parent_collection.delete(self, true)
      true
    end
292889
def deallocate(self):
        """"""
        if self._domain is not None:
            domain_delete(self._domain, self.logger)
        if self._hypervisor is not None:
            try:
                self._hypervisor.close()
            except Exception:
                self.logger.exception("Unable to close hypervisor connection.")
316028
def dispose(self):
        """"""
        self._username = None
        self._password = None
        self._org_url = None
        self._proxy_url = None
        self._proxy_port = None
        self._token_url = None
        self._securityHandler = None
        self._valid = None
        self._message = None

        del self._username
        del self._password
        del self._org_url
        del self._proxy_url
        del self._proxy_port
        del self._token_url
        del self._securityHandler
        del self._valid
        del self._message
1266135
def free_resources(self):
        '''  '''
        if not self.is_stopped():
            logger.info("Freeing resources: %s" % self.get_transfer_id())
            self.stop(True)
218756
public void disable() throws IOException {
        // This has to be synchronized or it can collide with the check in the task.
        synchronized (optOutLock) {
            // Check if the server owner has already set opt-out, if not, set it.
            if (!isOptOut()) {
                properties.setProperty("opt-out", "true");
                properties.store(new FileOutputStream(configurationFile), "http://mcstats.org");
            }

            // Disable Task, if it is running
            if (thread != null) {
                thread.interrupt();
                thread = null;
            }
        }
    }
1200249
def stop(self):
        
        # Exit the loop
        with self._lock:
            self._stop_event.set()
            self._shell_event.clear()

        if self._context is not None:
            # Unregister from events
            self._context.remove_service_listener(self)

            # Release the shell
            self.clear_shell()
            self._context = None
116506
def uninstall(self):
        """"""
        if self.is_installed():
            installed = self.installed_dir()
            if installed.is_symlink():
                installed.unlink()
            else:
                shutil.rmtree(str(installed))