Example #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-volumne/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->aChart instanceof Persistent) {
             $this->aChart->clearAllReferences($deep);
         }
         $this->alreadyInClearAllReferencesDeep = false;
     }
     // if ($deep)
     $this->aUser = null;
     $this->aChart = null;
 }
Example #2
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-volumne/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->collChartsRelatedById) {
             foreach ($this->collChartsRelatedById as $o) {
                 $o->clearAllReferences($deep);
             }
         }
         if ($this->collJobs) {
             foreach ($this->collJobs as $o) {
                 $o->clearAllReferences($deep);
             }
         }
         if ($this->aUser instanceof Persistent) {
             $this->aUser->clearAllReferences($deep);
         }
         if ($this->aOrganization instanceof Persistent) {
             $this->aOrganization->clearAllReferences($deep);
         }
         if ($this->aChartRelatedByForkedFrom instanceof Persistent) {
             $this->aChartRelatedByForkedFrom->clearAllReferences($deep);
         }
         $this->alreadyInClearAllReferencesDeep = false;
     }
     // if ($deep)
     if ($this->collChartsRelatedById instanceof PropelCollection) {
         $this->collChartsRelatedById->clearIterator();
     }
     $this->collChartsRelatedById = null;
     if ($this->collJobs instanceof PropelCollection) {
         $this->collJobs->clearIterator();
     }
     $this->collJobs = null;
     $this->aUser = null;
     $this->aOrganization = null;
     $this->aChartRelatedByForkedFrom = null;
 }