// [[Rcpp::export]] bool xptr_access_released( XPtr< std::vector<int> > p) { // double-release should be a no-op p.release(); // get should return NULL return p.get() == NULL; }
// [[Rcpp::export]] void connection_release(XPtr<MyConnectionPtr> con) { if ((*con)->hasQuery()) { warning("%s\n%s", "There is a result object still in use.", "The connection will be automatically released when it is closed" ); } return con.release(); }
// [[Rcpp::export]] void result_release(XPtr<PqResult> rs) { rs.release(); }
// [[Rcpp::export]] bool xptr_release( XPtr< std::vector<int> > p) { p.release(); return !p; }