public function free_result($resource = '') {

        // if no active connection exists, return false
        if (!$this->_connected()) return false;

        // if no resource was specified, and a query was run before, assign the last resource
        if ($resource == '' && isset($this->last_result) && $this->last_result !== false) $resource = & $this->last_result;

        // if argument is a valid resource, free the result
        // (we mute it as it might have already been freed by a previous call to this method)
        if ($this->_is_result($resource)) @mysqli_free_result($resource);

    }