this clears all the pages out, except to save
one page (unallocated)
195433
protected final void clear() {
        UnifiedDataPageX curr = getCurrentPage();

        for (int ii=0; ii<_buffers.length; ii++) {
            _buffers[ii] = null;
        }

        // curr is null when underlying stream is empty.
        if (curr != null)
        {
            _buffers[0] = curr;
            curr.reset(0);
        }

        _buffer_count = 0;
        _buffer_current = 0;
    }
899132
public function clear()
    {
        if (null !== $this->aSource) {
            $this->aSource->removeCategory($this);
        }
        $this->id = null;
        $this->source_id = null;
        $this->pageid = null;
        $this->title = null;
        $this->files = null;
        $this->subcats = null;
        $this->pages = null;
        $this->size = null;
        $this->hidden = null;
        $this->created_at = null;
        $this->updated_at = null;
        $this->tree_left = null;
        $this->tree_right = null;
        $this->tree_level = null;
        $this->alreadyInSave = false;
        $this->clearAllReferences();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
589472
def clear_content(self):
        
        for child in self[:]:
            if child.tag == qn('w:pPr'):
                continue
            self.remove(child)
433917
public function clear()
    {
        if (null !== $this->aCategory) {
            $this->aCategory->removeC2P($this);
        }
        if (null !== $this->aPage) {
            $this->aPage->removeC2P($this);
        }
        $this->category_id = null;
        $this->page_id = null;
        $this->alreadyInSave = false;
        $this->clearAllReferences();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
62742
public function clear()
    {
        /** @var PageCategory $pageCategory */
        $pageCategory = $this->app[PageCategory::class];

        /** @var PageKey $key */
        foreach ($pageCategory->getList() as $key) {
            /** @var SearchIndexerInterface $indexer */
            $indexer = $key->getSearchIndexer();

            // Update the key tables
            $indexer->updateSearchIndexKeyColumns($pageCategory, $key);
        }

        // Truncate the existing search index
        $database = $this->app['database']->connection();
        $database->Execute('truncate table PageSearchIndex');
    }
272663
def _forget_page(self, page):
        """"""
        pid = id(page)
        if pid in self._page_refs:
            self._page_refs[pid] = None
847464
public function cleanUp() {
        unset($this->pdfdata);
        $this->pdfdata = '';
        unset($this->objstreams);
        $this->objstreams = array();
        unset($this->objects);
        $this->objects = array();
        unset($this->objstreamobjs);
        $this->objstreamobjs = array();
        unset($this->xref);
        $this->xref = array();
        unset($this->objoffsets);
        $this->objoffsets = array();
        unset($this->pages);
        $this->pages = array();
    }
124744
private function removeNonMappedPages()
    {
        /** @var PageInterface[] $staticPages */
        $staticPages = $this->pageRepository->findBy(['static' => true], ['left' => 'DESC']);
        foreach ($staticPages as $page) {
            if (null === $this->findRouteDefinitionByRouteName($page->getRoute())) {
                $this->outputPageAction($page->getName(), 'removed');
                $this->pageOperator->delete($page);
            }
        }
    }
1034962
def clear_data(self):
        '''
         '''
        if self.forest.verbose > 1:
            print('clearing up stuff')
        self.S = None
        self.Uy = None
        self.U = None
1287486
public void clearUnused(ConfigImpl config) {

	SystemOut.printDate(config.getOutWriter(), "PagePool: " + size() + ">(" + maxSize + ")");
	if (size() > maxSize) {
	    String[] keys = keys();
	    LongKeyList list = new LongKeyList();
	    for (int i = 0; i < keys.length; i++) {
		PageSource ps = getPageSource(keys[i], false);
		long updateTime = ps.getLastAccessTime();
		if (updateTime + timeout < System.currentTimeMillis()) {
		    long add = ((ps.getAccessCount() - 1) * 10000);
		    if (add > timeout) add = timeout;
		    list.add(updateTime + add, keys[i]);
		}
	    }
	    while (size() > maxSize) {
		Object key = list.shift();
		if (key == null) break;
		remove(key.toString());
	    }
	}
    }
32863
function () {
            this.unloadCommonModules();
            var pageModRefpaths = this._modulesPaths.page;
            for (var pageId in pageModRefpaths) {
                if (pageModRefpaths.hasOwnProperty(pageId)) {
                    this.unloadPageModules(pageId);
                }
            }
        }
1030961
public function clear()
    {
        $this->id = null;
        $this->type = null;
        $this->title = null;
        $this->year = null;
        $this->publisher = null;
        $this->journal = null;
        $this->number = null;
        $this->school = null;
        $this->author = null;
        $this->edition = null;
        $this->volume = null;
        $this->address = null;
        $this->editor = null;
        $this->howpublished = null;
        $this->note = null;
        $this->booktitle = null;
        $this->pages = null;
        $this->url = null;
        $this->lastchecked = null;
        $this->managed = null;
        $this->alreadyInSave = false;
        $this->clearAllReferences();
        $this->applyDefaultValues();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }
380581
public function pageClose()
    {
        $systemEventHandler = $this->_getSystemEventHandler();
        $systemEventHandler->onShopEnd();

        $mySession = $this->getSession();

        if (isset($mySession)) {
            $mySession->freeze();
        }

        //commit file cache
        \OxidEsales\Eshop\Core\Registry::getUtils()->commitFileCache();
    }
68379
function() {
        for (var p=0;p<this.pages.length;++p) {
            var cal = this.pages[p];
            cal.clear();
        }

        this.cfg.setProperty(DEF_CFG.SELECTED.key, []);
        this.cfg.setProperty(DEF_CFG.PAGEDATE.key, new Date(this.pages[0].today.getTime()));
        this.render();
    }
1015848
public void clear(ClassLoader cl) {
	Page page = this.page;
	if (page != null && page.getClass().getClassLoader().equals(cl)) {
	    this.page = null;
	}
    }
1155715
def _clear(self):
        
        self.root = RootGroup()
        self.groups = []
        self.entries = []
        self.readonly = False
        self.header = None
        self.password = None
        self.keyfile = None
        self.filepath = None
90216
public function clear()
    {
        if (null !== $this->aMedia) {
            $this->aMedia->removeM2P($this);
        }
        if (null !== $this->aPage) {
            $this->aPage->removeM2P($this);
        }
        $this->media_id = null;
        $this->page_id = null;
        $this->alreadyInSave = false;
        $this->clearAllReferences();
        $this->resetModified();
        $this->setNew(true);
        $this->setDeleted(false);
    }