Exemplo n.º 1
0
 /**
  * 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->collArticulovariantes) {
             foreach ($this->collArticulovariantes as $o) {
                 $o->clearAllReferences($deep);
             }
         }
         if ($this->collArticulovariantevalors) {
             foreach ($this->collArticulovariantevalors as $o) {
                 $o->clearAllReferences($deep);
             }
         }
         if ($this->collPropiedads) {
             foreach ($this->collPropiedads as $o) {
                 $o->clearAllReferences($deep);
             }
         }
         if ($this->collPropiedadvalors) {
             foreach ($this->collPropiedadvalors as $o) {
                 $o->clearAllReferences($deep);
             }
         }
         if ($this->aTipo instanceof Persistent) {
             $this->aTipo->clearAllReferences($deep);
         }
         $this->alreadyInClearAllReferencesDeep = false;
     }
     // if ($deep)
     if ($this->collArticulovariantes instanceof PropelCollection) {
         $this->collArticulovariantes->clearIterator();
     }
     $this->collArticulovariantes = null;
     if ($this->collArticulovariantevalors instanceof PropelCollection) {
         $this->collArticulovariantevalors->clearIterator();
     }
     $this->collArticulovariantevalors = null;
     if ($this->collPropiedads instanceof PropelCollection) {
         $this->collPropiedads->clearIterator();
     }
     $this->collPropiedads = null;
     if ($this->collPropiedadvalors instanceof PropelCollection) {
         $this->collPropiedadvalors->clearIterator();
     }
     $this->collPropiedadvalors = null;
     $this->aTipo = null;
 }