public function destroy()
    {
        // This is not mandatory as GC will free the memory eventually but allows memory to be freed faster
        // by removing circular dependencies.
        if (!empty($this->data)) {
            foreach ($this->data as $data) {
                if ($data instanceof DestroyableObject) {
                    $data->destroy();
                }
            }
        }
        $this->data = [];
        $this->manialinkFactory = null;
    }
public function destroy()
    {
        // This is not mandatory as GC will free the memory eventually but allows memory to be freed faster
        // by removing circular dependencies.
        if (!empty($this->data)) {
            foreach ($this->data as $data) {
                if ($data instanceof DestroyableObject) {
                    $data->destroy();
                }
            }
        }
        $this->data = [];
        $this->manialinkFactory = null;
    }
public function destroy ( ) { // This is not mandatory as GC will free the memory eventually but allows memory to be freed faster // by removing circular dependencies. if ( ! empty ( $ this -> data ) ) { foreach ( $ this -> data as $ data ) { if ( $ data instanceof DestroyableObject ) { $ data -> destroy ( ) ; } } } $ this -> data = [ ] ; $ this -> manialinkFactory = null ; }
Destroys a manialink.

@return mixed
Destroys a manialink .