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();
    }
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();
    }
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 ( ) ; }
Tries to clear all cached data objects and row objects

Usful when processing lot of components to avoid memory issues
Tries to clear all cached data objects and row objects