deactivate the environment
770627
def deactivate(self):
        
        try:
            self.phase = PHASE.DEACTIVATE
            self.logger.info("Deactivating environment %s..." % self.namespace)
            self.directory.rewrite_config = False
            self.instantiate_features()
            self._specialize()
            for feature in self.features.run_order:
                self.logger.info("Deactivating %s..." % feature[0])
                self.run_action(feature, 'deactivate')
            self.clear_all()
            self._finalize()
        except Exception:
            self.logger.debug("", exc_info=sys.exc_info())
            et, ei, tb = sys.exc_info()
            reraise(et, ei, tb)
635252
def cleanup(self):
        """"""
        for path in self.paths:
            if isinstance(path, tuple):
                os.close(path[0])
                os.unlink(path[1])
            else:
                shutil.rmtree(path)
        self.paths = []
1193462
protected function cleanEnvironments()
    {
        $environmentsWhichExist = array();
        foreach ($this->getEnvironments() as $key => $environment) {

            $msg = "Cleaning environment  from storage {$environment}";
            if (true == $this->vagrentExists($environment)) {
                $environmentsWhichExist[] = $environment;
                $msg = "Not cleaning from storage {$environment}";
            }
            $this->printLn($msg);
        }
        $this->setEnvironments($environmentsWhichExist);
        return $this;
    }
646058
public void shutdown()
    {
        Environment env = ((BaseApplication)m_app).getEnvironment();
        if (m_app != null)
        	m_app.free();
        m_app = null;
        if (ClassServiceUtility.getClassService().getClassFinder(null) != null)
            ClassServiceUtility.getClassService().getClassFinder(null).shutdownService(null, this);
        if (env != null)
        	env.freeIfDone();
//x        System.exit(0);
    }
1337335
public void deactivate(ComponentContext cc) throws IOException {
        ConfigProviderResolver.setInstance(null);
        shutdown();
        scheduledExecutorServiceRef.deactivate(cc);
    }
1306978
def cleanup():
    """"""
    lib_dir = os.path.join(os.environ['CONTAINER_DIR'], '_lib')
    if os.path.exists(lib_dir):
        shutil.rmtree(lib_dir)
    os.mkdir(lib_dir)
63587
def deactivate(profile='default'):
    
    with jconfig(profile) as config:
        deact = True;
        if not getattr(config.NotebookApp.contents_manager_class, 'startswith',lambda x:False)('jupyterdrive'):
            deact=False
        if 'gdrive' not in getattr(config.NotebookApp.tornado_settings,'get', lambda _,__:'')('contents_js_source',''):
            deact=False
        if deact:
            del config['NotebookApp']['tornado_settings']['contents_js_source']
            del config['NotebookApp']['contents_manager_class']
154961
def unset_env(self, key):
        """"""
        os.environ.pop(make_env_key(self.appname, key), None)
        self._registered_env_keys.discard(key)
        self._clear_memoization()
808611
def _disable(self):
        
        self.total_time += time() - self.enabled_start
        self.enabled_start = None
        del self.stack
418300
def delete_environment(self, environment_ids):
        
        uri = 'api/v3/environment/%s/' % environment_ids

        return super(ApiEnvironment, self).delete(uri)
1069180
def clear(self):
        
        self.name.clear()
        self.path.clear()
        self.generated = False
563774
public void reduceThis(){
		if (elements==null || elements.isEmpty())
			throw new AssertionError("Can't reduce this environment");
		elements.remove(elements.size()-1);
	}
766187
function () {
        if (this.active) {
            this.handlers.feature.deactivate();
            if(this.handlers.box) {
                this.handlers.box.deactivate();
            }
            if(this.layers) {
                this.map.removeLayer(this.layer);
            }
        }
        return OpenLayers.Control.prototype.deactivate.apply(
            this, arguments
        );
    }
309234
protected void deactivate(ComponentContext compContext) {
        if (mbeanTracker != null) {
            mbeanTracker.close();
        }
        pipeline.remove(mDelayedMBeanActivator);
    }
192488
def _remove_existing(self):
        
        for key in self._keys:
            if key in os.environ:
                LOG.debug('%r: removing old key %r', self, key)
                del os.environ[key]
        self._keys = []
783962
def off(self):
        """"""
        off_command = ExtendedSend(self._address,
                                   COMMAND_LIGHT_OFF_0X13_0X00,
                                   self._udata)
        off_command.set_checksum()
        self._send_method(off_command, self._off_message_received)
557621
def deallocate(self):
        """"""
        self.logger.debug("Deallocating environment.")
        self._deallocate()
        self.logger.debug("Environment successfully deallocated.")