public function cleanup() { $this->closeFile(); if ($this->project != null) { $this->project->removeBuildListener($this); } $this->project = null; }