Free resources and make this instance unusable
496395
function() {

		for (var name in this._events_listeners) {

			if (this._events_listeners[name]) {

				Lava.Core.removeGlobalHandler(this._events_listeners[name]);
				this._events_listeners[name] = null;
				this._event_usage_counters[name] = 0;

			}

		}

	}
862014
def free_memory(cls, exclude=None):
        """"""

        annotations_in_memory = Annotation.__ANNOTATIONS_IN_MEMORY__

        exclude = () if exclude is None else exclude

        for annotation_cls in list(annotations_in_memory.keys()):

            if issubclass(annotation_cls, exclude):
                continue

            if issubclass(annotation_cls, cls):
                del annotations_in_memory[annotation_cls]
199324
def _make_resource(self):
        
        with self._lock:
            for i in self._unavailable_range():
                if self._reference_queue[i] is None:
                    rtracker = _ResourceTracker(
                        self._factory(**self._factory_arguments))

                    self._reference_queue[i] = rtracker
                    self._size += 1

                    return rtracker

            raise PoolFullError
1104507
private function free()
    {
        $this->resource = null;
        $this->writable = false;

        if (!$this->writes->isEmpty()) {
            $exception = new ClosedException("The socket was closed before writing completed");
            do {
                /** @var \Amp\Deferred $deferred */
                list(, , $deferred) = $this->writes->shift();
                $deferred->fail($exception);
            } while (!$this->writes->isEmpty());
        }

        Loop::cancel($this->watcher);
    }
779233
public void forceClose() {
        // Move all elements from usedInstances to unusedInstances in a threadsafe way
        for (final T usedInstance : new ArrayList<>(usedInstances)) {
            if (usedInstances.remove(usedInstance)) {
                unusedInstances.add(usedInstance);
            }
        }
        close();
    }
151738
def unload():
        """"""
        global __tile_maps
        global active_map
        if TileMapManager.active_map != None:
            world = Ragnarok.get_world()

            for obj in TileMapManager.active_map.objects:
                world.remove_obj(obj)
            world.remove_obj(TileMapManager.active_map)
1074194
public void free()
    {
        this.close();
        while (m_vTableList.size() > 0)
        {
            BaseTable table = m_vTableList.elementAt(0);
            table.free();
        } 
        m_vTableList.removeAllElements();
        m_vTableList = null;

        if (m_databaseOwner != null)
            m_databaseOwner.removeDatabase(this);
        m_databaseOwner = null;
        m_strDbName = null;
    }
825575
public function free()
    {
        if ($this->locked) {
            $this->unlock();
        }
        $this->content = null;
        $this->raw = null;

        unset(static::$instances[$this->filename]);
    }
280106
def free(self, ptr):  #pylint:disable=unused-argument
        
        raise NotImplementedError("%s not implemented for %s" % (self.free.__func__.__name__,
                                                                 self.__class__.__name__))
752050
public void free()
    {
        m_strQueueName = null;
        m_strQueueType = null;
        m_source = null;
        m_mxProperties = null;
        m_intFilterID = null;
    }
412827
def dump(cls):
        """"""
        with cls.lock:
            if not cls.instances: return
            atexit.unregister(cls.dump)

            cls._pre_dump()

            for self in cls.instances.values():
                self._dump()

            cls._post_dump()
1195603
public void free()
    {
        if (this.getTargetScreen(JBaseFrame.class) != null)
            ((JBaseFrame)this.getTargetScreen(JBaseFrame.class)).setTitle(null);
        this.freeSubComponents(this);
    }
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
        }
    }
874470
def _destroy(self):
        """"""
        self.unuse_region()

        if self._rlist is not None:
            # Actual client count, which doesn't include the reference kept by the manager, nor ours
            # as we are about to be deleted
            try:
                if len(self._rlist) == 0:
                    # Free all resources associated with the mapped file
                    self._manager._fdict.pop(self._rlist.path_or_fd())
                # END remove regions list from manager
            except (TypeError, KeyError):
                # sometimes, during shutdown, getrefcount is None. Its possible
                # to re-import it, however, its probably better to just ignore
                # this python problem (for now).
                # The next step is to get rid of the error prone getrefcount alltogether.
                pass
1061899
public synchronized void unuse() {
        assert(inUse);
        inUse = false;
        compiler = null;
        fileManager = null;
        fileManagerBase = null;
        smartFileManager = null;
        context = null;
        subTasks = null;
    }
657003
private void cleanUpSource() {
		SoundStore store = SoundStore.get();
		
		AL10.alSourceStop(store.getSource(0));
		IntBuffer buffer = BufferUtils.createIntBuffer(1);
		int queued = AL10.alGetSourcei(store.getSource(0), AL10.AL_BUFFERS_QUEUED);
		
		while (queued > 0)
		{
			AL10.alSourceUnqueueBuffers(store.getSource(0), buffer);
			queued--;
		}
		
		AL10.alSourcei(store.getSource(0), AL10.AL_BUFFER, 0);
	}
722512
public void free()
    {
        super.free(); // Do any inherited
        try   {
            if (m_remoteDatabase != null)
            {
                synchronized (this.getSyncObject(m_remoteDatabase))
                {
                    m_remoteDatabase.freeRemoteSession();
                    m_remoteDatabase = null;
                }
            }
        } catch (RemoteException ex)    {
            Utility.getLogger().warning("Remote free error: " + ex.getMessage());
            ex.printStackTrace();
        }
    }