/** * 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->aEspecialidad instanceof Persistent) { $this->aEspecialidad->clearAllReferences($deep); } if ($this->aMedico instanceof Persistent) { $this->aMedico->clearAllReferences($deep); } $this->alreadyInClearAllReferencesDeep = false; } // if ($deep) $this->aEspecialidad = null; $this->aMedico = 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->collAdmisions) { foreach ($this->collAdmisions as $o) { $o->clearAllReferences($deep); } } if ($this->collCitas) { foreach ($this->collCitas as $o) { $o->clearAllReferences($deep); } } if ($this->collConsultas) { foreach ($this->collConsultas as $o) { $o->clearAllReferences($deep); } } if ($this->collMedicoespecialidads) { foreach ($this->collMedicoespecialidads as $o) { $o->clearAllReferences($deep); } } if ($this->collMedicofacturacions) { foreach ($this->collMedicofacturacions as $o) { $o->clearAllReferences($deep); } } if ($this->aEspecialidad instanceof Persistent) { $this->aEspecialidad->clearAllReferences($deep); } $this->alreadyInClearAllReferencesDeep = false; } // if ($deep) if ($this->collAdmisions instanceof PropelCollection) { $this->collAdmisions->clearIterator(); } $this->collAdmisions = null; if ($this->collCitas instanceof PropelCollection) { $this->collCitas->clearIterator(); } $this->collCitas = null; if ($this->collConsultas instanceof PropelCollection) { $this->collConsultas->clearIterator(); } $this->collConsultas = null; if ($this->collMedicoespecialidads instanceof PropelCollection) { $this->collMedicoespecialidads->clearIterator(); } $this->collMedicoespecialidads = null; if ($this->collMedicofacturacions instanceof PropelCollection) { $this->collMedicofacturacions->clearIterator(); } $this->collMedicofacturacions = null; $this->aEspecialidad = null; }