Beispiel #1
0
 /**
  * Destroys the event and frees all the resources associated.
  * @see event_free
  *
  * @param bool $baseCall Argument for prevent infinite loop
  *
  * @return void
  */
 public function free($baseCall = false)
 {
     if ($this->check()) {
         if ($this->enabled) {
             $this->remove($baseCall);
         }
         event_free($this->resource);
         // Resource must be nulled before removeEvent to prevent infinite loop
         $this->resource = null;
         if (false === $baseCall) {
             $this->base->removeEvent($this->name);
         }
         $this->base = null;
         $this->arguments = array();
         $this->callback = null;
         $this->prepared = false;
     }
 }