public function cleanup()
    {
        if (!$this->memory) {
            throw new \LogicException("Cleanup should be used after allocate.");
        }

        $this->memory->delete();
        $this->memory = null;
    }
public function cleanup()
    {
        if (!$this->memory) {
            throw new \LogicException("Cleanup should be used after allocate.");
        }

        $this->memory->delete();
        $this->memory = null;
    }
public function cleanup ( ) { if ( ! $ this -> memory ) { throw new \ LogicException ( "Cleanup should be used after allocate." ) ; } $ this -> memory -> delete ( ) ; $ this -> memory = null ; }
Method to be called when the adapter is finished with.

@return void
@throws \LogicException
Method to be called when the adapter is finished with .