For using then deleting objects.
495046
def delete(*args):
    ''''''
    from syn.base_utils import this_module
    mod = this_module(npop=3)
    yield
    for arg in args:
        name = arg
        if not isinstance(name, STR):
            name = arg.__name__
        delattr(mod, name)
148498
void cleanUpStaleEntries() {
        for (KeyedRef<K, V> ref = q.poll(); ref != null; ref = q.poll()) {
            map.remove(ref.getKey(), ref); // CONCURRENT remove() operation
        }
    }
802253
protected void evict() {
        lock.lock();

        Map<K, E> removingObjects = null;
        try {
            for (Map.Entry<K, E> entry : pool.entrySet()) {
                if (entry.getValue().activityPrint().isExpired()) {
                    if (removingObjects == null) {
                        removingObjects = Objectory.createMap();
                    }

                    removingObjects.put(entry.getKey(), entry.getValue());
                }
            }

            if (N.notNullOrEmpty(removingObjects)) {
                for (K key : removingObjects.keySet()) {
                    E e = pool.remove(key);

                    if (logger.isInfoEnabled()) {
                        logger.info("Evicting expired cached object. KEY: " + key + ", VALUE: " + N.toString(e) + ". Activity print: " + e.activityPrint());
                    }

                }

                destroyObject(removingObjects);

                notFull.signalAll();
            }
        } finally {
            lock.unlock();

            Objectory.recycle(removingObjects);
        }
    }
428863
function clearOwnProperties(obj) {
  _.forOwn(obj, function (value, key) {
    delete obj[key];
  });

  return obj;
}
559936
def cleanup(self):
        
        remove = []
        for handle, assoc in self.assocs.items():
            if assoc.expiresIn == 0:
                remove.append(handle)
        for handle in remove:
            del self.assocs[handle]
        return len(remove), len(self.assocs)
868535
public void cleanup() {
    keys.cleanup();
    counts.cleanup();
    dictionary.cleanup();
    // Decrement the dictionary memory by the total size of all the elements
    memoryEstimate.decrementDictionaryMemory(SizeOf.SIZE_OF_LONG * numElements);
  }
44149
def cleanup(logger, *args):
    """"""
    for obj in args:
        if obj is not None and hasattr(obj, 'cleanup'):
            try:
                obj.cleanup()
            except NotImplementedError:
                pass
            except Exception:
                logger.exception("Unable to cleanup %s object", obj)
948973
def delete_object(self, obj):
        """"""
        if _debug: Application._debug("delete_object %r", obj)

        # extract the object name and identifier
        object_name = obj.objectName
        object_identifier = obj.objectIdentifier

        # delete it from the application
        del self.objectName[object_name]
        del self.objectIdentifier[object_identifier]

        # remove the object's identifier from the device's object list
        # if there is one and it has an object list property
        if self.localDevice and self.localDevice.objectList:
            indx = self.localDevice.objectList.index(object_identifier)
            del self.localDevice.objectList[indx]

        # make sure the object knows it's detached from an application
        obj._app = None
1193444
def clear(*objects_to_clear):
    
    if not hasattr(_thread_local_data, 'current_space'):
        return

    space = current_space()
    for obj in objects_to_clear:
        space.clear(obj)
1067716
def cleanup(args):
    
    with _catalog(args) as cat:
        n, d, r = len(cat), [], []
        for obj in cat:
            if not obj.bitstreams:
                if obj.is_special:
                    print('removing {0} from catalog'.format(obj.id))
                    r.append(obj)
                else:
                    print('deleting {0} from CDSTAR'.format(obj.id))
                    d.append(obj)
        for obj in d:
            cat.delete(obj)
        for obj in r:
            cat.remove(obj)
        args.log.info('{0} objects deleted'.format(n - len(cat)))
        return n - len(cat)
434374
def cleanup(self):
        
        empty_keys = [k for k, v in self.items() if not v]

        for k in empty_keys:
            del self[k]
124688
function clean(obj) {
    for (var prop in obj) if (obj[prop] == null) delete obj[prop];
    return obj;
  }
537754
def delete(self, obj, matches=None, mt=None, lt=None, eq=None):
        '''
        
        '''
        deleted = False
        objects = list()
        for _obj in self.get(obj):
            if not self.__criteria(_obj, matches=matches, mt=mt, lt=lt, eq=eq):
                objects.append(_obj)
            else:
                deleted = True

        self.flush(obj._TABLE)
        self.create_table_from_object(obj())
        for _obj in objects:
            self.store(_obj)

        return deleted
1155820
public void cleanup() {
        List<String> keys = new ArrayList<>(created.keySet());
        keys.sort(String::compareTo);
        for (String key : keys) {
            created.remove(key)
                .stream()
                .sorted(Comparator.comparing(HasMetadata::getKind))
                .forEach(metadata -> {
                    log.info(String.format("Deleting %s : %s", key, metadata.getKind()));
                    deleteWithRetries(metadata);
                });
        }
    }
663689
def cleanup(self):
        
        remove = []
        for handle, assoc in self.assocs.iteritems():
            if assoc.getExpiresIn() == 0:
                remove.append(handle)
        for handle in remove:
            del self.assocs[handle]
        return len(remove), len(self.assocs)
817399
function cleanObject(Object){
    delete Object.resolve;
    delete Object.reject;
    delete Object.resolveResult;
    delete Object.rejectResult;
    delete Object.launchPromise;
    delete Object.promiseFunc;
}
1238892
public function deleteWordsWithoutObjects()
    {
        $query = $this->dbHandler->createDeleteQuery();

        $query->deleteFrom($this->dbHandler->quoteTable('ezsearch_word'))
            ->where($query->expr->eq($this->dbHandler->quoteColumn('object_count'), ':c'));

        $stmt = $query->prepare();
        $stmt->execute(['c' => 0]);
    }