Cleans up the project, but only if it's empty.<p>
963472
private void cleanupProjectIfEmpty() {

        m_requiresCleanup = false;
        try {
            CmsObject cms = OpenCms.initCmsObject(m_adminCms);
            cms.readProject(getProject().getUuid());
        } catch (CmsException e) {
            return;
        }
        try {
            CmsObject cms = OpenCms.initCmsObject(m_adminCms);
            cms.getRequestContext().setCurrentProject(getProject());
            CmsUUID projectId = getProject().getUuid();
            List<CmsResource> projectResources = cms.readProjectView(projectId, CmsResource.STATE_KEEP);
            if (projectResources.isEmpty()) {
                cms.deleteProject(projectId);
            }
        } catch (CmsException e) {
            LOG.error(e.getLocalizedMessage(), e);
        }
    }
198887
public void clear ()
    {
    if (data != null) {
        for (int i = 0; i < (length * 5); i++)
        data [i] = null;
    }
    length = 0;
    }
459893
public void cleanup(boolean reuse, boolean wasInsert)
    {
        if(currentImage != null)
        {
            performImageCleanup(currentImage, reuse);
        }
        if(beforeImage != null)
        {
            // we always free all resources of the old image
            performImageCleanup(beforeImage, false);
        }
        if(reuse)
        {
            refreshObjectImage(wasInsert);
        }
        else
        {
            myObj = null;
        }
    }
1293662
public function cleanAndRebuildAction()
    {
        if (! self::checkSignin() ) die(self::$NOT_SIGNIN);

        if ( ($this->actProject) && in_array($this->actProject, $this->projects) ) {

            $cmd = "{$this->php} {$this->indexer} --source={$this->adapter}://{$this->username}:{$this->password}@{$this->host}:3306/{$this->dbname} --sql=\"SELECT * FROM {$this->table}\" --project={$this->projectPath}{$this->actProject}.ini --clean";

            echo self::$HAS_CLEAN_AND_REBUILD;

            fastcgi_finish_request();

            shell_exec($cmd);
        } else {
            echo self::NOT_EXISTS;
        }
    }
1360961
@Override
    public boolean isEmpty() {
        /*
         * Sum per-segment modCounts to avoid mis-reporting when
         * elements are concurrently added and removed in one segment
         * while checking another, in which case the table was never
         * actually empty at any point. (The sum ensures accuracy up
         * through at least 1<<31 per-segment modifications before
         * recheck.)  Methods size() and containsValue() use similar
         * constructions for stability checks.
         */
        long sum = 0L;
        final Segment<K,V>[] segments = this.segments;
        for (int j = 0; j < segments.length; ++j) {
            Segment<K,V> seg = segmentAt(segments, j);
            if (seg != null) {
                if (seg.count != 0) {
                  return false;
                }
                sum += seg.modCount;
            }
        }
        if (sum != 0L) { // recheck unless no modifications
            for (int j = 0; j < segments.length; ++j) {
                Segment<K,V> seg = segmentAt(segments, j);
                if (seg != null) {
                    if (seg.count != 0) {
                      return false;
                    }
                    sum -= seg.modCount;
                }
            }
            if (sum != 0L) {
              return false;
            }
        }
        return true;
    }
460418
private void cleanup() throws IOException {
        JarFileManager.INSTANCE.close();
        TempFileManager.INSTANCE.close();
        MavenResolvers.close();
    }
913419
public void cleanup() {
        state = null;
        if (headerBuffer != null) {
            bufferPool.deallocate(headerBuffer);
        }
        if (dataBuffer != null) {
            bufferPool.deallocate(dataBuffer);
        }
    }
1171531
protected void cleanUp() {

        m_importResource = null;
        m_importZip = null;
        m_report = null;
        m_linkStorage = null;
        m_linkPropertyStorage = null;
        m_groupsToCreate = null;
        m_cms = null;
    }
693448
def is_empty(self):
        """"""
        return (not self.breakpoint and not self.code_analysis
                and not self.todo and not self.bookmarks)
195859
protected void cleanupFromFinish() {
        _response = null;
        _bufferSize = 0;
        _encoding = null;
        // LIBERTY _responseBuffer = null;
        // _outWriterEncoding = null;
        _gotOutputStream = false;
        _gotWriter = false;
        this._pwriter = null;
    }
222885
private synchronized void clean() {
		
		while (checkOverFlow()) {

			List<CacheObject> cacheObjectList = sort();

			if (cacheObjectList != null && cacheObjectList.size() > 0) {
				CacheObject cacheObject = (CacheObject) cacheObjectList.get(0);
				remove(cacheObject.getKey());
			}
		}
	}
1129995
private void tidy() {
        nonPermanent.entrySet().stream()
                .map(entry -> {
                    List<WeakReference<IzouSoundLineBaseClass>> collect = entry.getValue().stream()
                            .filter(izouSoundLineWeakReference -> izouSoundLineWeakReference.get() != null)
                            .collect(Collectors.toList());
                    if (!collect.isEmpty()) {
                        nonPermanent.put(entry.getKey(), collect);
                        return null;
                    } else {
                        return entry;
                    }
                })
                .filter(Objects::nonNull)
                .forEach(entry -> nonPermanent.remove(entry.getKey()));
    }
306435
public void clear() {
        buffer().ensureCapacity(0);
        this.engine = null;
        this.tmpl = null;
        this.cName = null;
        this.pName = null;
        this.tagName = null;
        this.initCode = null;
        this.finalCode = null;
        this.extended = null;
        this.extendedTemplateClass = null;
        if (null != this.extendArgs) this.extendArgs.pl.clear();
        this.imports.clear();
        this.extendDeclareLineNo = 0;
        this.renderArgs.clear();
        this.builders.clear();
        this.parser = null;
        this.templateClass = null;
        this.inlineClasses.clear();
        this.inlineTags.clear();
        this.inlineTagBodies.clear();
        this.importLineMap.clear();
        this.logTime = false;
        this.macros.clear();
        this.macroStack.clear();
        this.buildBody = null;
        this.templateDefLang = null;
        this.staticCodes.clear();
    }
62873
public void checkEmptyContainers() {

        if (getWidgetCount() == 0) {
            if (m_emptyContainerElement != null) {
                m_emptyContainerElement.getStyle().clearDisplay();
            } else if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_containerData.getEmptyContainerContent())) {
                // add empty container element
                try {
                    m_emptyContainerElement = CmsDomUtil.createElement(m_containerData.getEmptyContainerContent());
                    getElement().appendChild(m_emptyContainerElement);
                } catch (Exception e) {
                    CmsDebugLog.getInstance().printLine(e.getMessage());
                }
            }
        } else if (m_emptyContainerElement != null) {
            m_emptyContainerElement.removeFromParent();
            m_emptyContainerElement = null;
        }
    }
546074
protected void cleanupEmptyWorkflowProjects(List<CmsProject> projects) throws CmsException {

        if (projects == null) {
            projects = OpenCms.getOrgUnitManager().getAllManageableProjects(m_adminCms, "", true);
        }
        for (CmsProject project : projects) {
            if (project.isWorkflowProject()) {
                if (isProjectEmpty(project)) {
                    m_adminCms.deleteProject(project.getUuid());
                }
            }
        }
    }
503791
void cleanChain()
  {

    if (tc.isEntryEnabled())
      tc.entry(this,cclass, "cleanChain");

    for (PartialMatch p = this; p.next != null; )
      if (p.next.isEmpty())
        p.next = p.next.next;
      else
        p = p.next;

    if (tc.isEntryEnabled())
      tc.exit(this,cclass, "cleanChain");
  }
1357250
static void cleanup() {
        String tempFolder = getTempDir().getAbsolutePath();
        File dir = new File(tempFolder);

        File[] nativeLibFiles = dir.listFiles(new FilenameFilter() {
            private final String searchPattern = "secp256k1-";
            public boolean accept(File dir, String name) {
                return name.startsWith(searchPattern) && !name.endsWith(".lck");
            }
        });
        if(nativeLibFiles != null) {
            for(File nativeLibFile : nativeLibFiles) {
                File lckFile = new File(nativeLibFile.getAbsolutePath() + ".lck");
                if(!lckFile.exists()) {
                    try {
                        nativeLibFile.delete();
                    }
                    catch(SecurityException e) {
                        System.err.println("Failed to delete old native lib" + e.getMessage());
                    }
                }
            }
        }
    }