/** * Resets all references to other model objects or collections of model objects. * * This method is a user-space workaround for PHP's inability to garbage collect * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { if ($deep && !$this->alreadyInClearAllReferencesDeep) { $this->alreadyInClearAllReferencesDeep = true; if ($this->collCustomListElements) { foreach ($this->collCustomListElements as $o) { $o->clearAllReferences($deep); } } if ($this->collCyclicalEventHasLists) { foreach ($this->collCyclicalEventHasLists as $o) { $o->clearAllReferences($deep); } } if ($this->collEventHasLists) { foreach ($this->collEventHasLists as $o) { $o->clearAllReferences($deep); } } if ($this->collCyclicalEventss) { foreach ($this->collCyclicalEventss as $o) { $o->clearAllReferences($deep); } } if ($this->collEventss) { foreach ($this->collEventss as $o) { $o->clearAllReferences($deep); } } if ($this->aUser instanceof Persistent) { $this->aUser->clearAllReferences($deep); } $this->alreadyInClearAllReferencesDeep = false; } // if ($deep) if ($this->collCustomListElements instanceof PropelCollection) { $this->collCustomListElements->clearIterator(); } $this->collCustomListElements = null; if ($this->collCyclicalEventHasLists instanceof PropelCollection) { $this->collCyclicalEventHasLists->clearIterator(); } $this->collCyclicalEventHasLists = null; if ($this->collEventHasLists instanceof PropelCollection) { $this->collEventHasLists->clearIterator(); } $this->collEventHasLists = null; if ($this->collCyclicalEventss instanceof PropelCollection) { $this->collCyclicalEventss->clearIterator(); } $this->collCyclicalEventss = null; if ($this->collEventss instanceof PropelCollection) { $this->collEventss->clearIterator(); } $this->collEventss = null; $this->aUser = null; }
/** * Resets all references to other model objects or collections of model objects. * * This method is a user-space workaround for PHP's inability to garbage collect * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { if ($deep && !$this->alreadyInClearAllReferencesDeep) { $this->alreadyInClearAllReferencesDeep = true; if ($this->aUser instanceof Persistent) { $this->aUser->clearAllReferences($deep); } if ($this->aGroup instanceof Persistent) { $this->aGroup->clearAllReferences($deep); } $this->alreadyInClearAllReferencesDeep = false; } // if ($deep) $this->aUser = null; $this->aGroup = null; }