public function freeMemory()
    {
        $this->_freeMemory();
        foreach ($this->_dataCache as $id=>$c) {
            if (isset($this->_dataCacheIgnoreVisible[$id])) {
                unset($this->_dataCacheIgnoreVisible[$id]);
            }
            $c->_freeMemory();
        }
        foreach ($this->_dataCacheIgnoreVisible as $id=>$c) {
            $c->_freeMemory();
        }
        $this->_dataCache = array();
        $this->_dataCacheIgnoreVisible = array();
        $this->_componentsByClassCache = null;
        $this->_componentsByDbIdCache = null;
        $this->_generatorsForClassesCache = array();
        //Kwf_Component_Generator_Abstract::clearInstances();
        Kwf_Model_Abstract::clearAllRows();

        if (function_exists('gc_collect_cycles')) gc_collect_cycles();
    }