N98\Util\AutoloadHandler::getCleanupCallback PHP Method

getCleanupCallback() public method

public getCleanupCallback ( )
    public function getCleanupCallback()
    {
        $self = (object) array('ref' => $this);
        return function () use($self) {
            if (isset($self->ref)) {
                $self->ref->reset();
                unset($self->ref);
            }
        };
    }