Esempio n. 1
0
// [[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;
}
Esempio n. 2
0
// [[Rcpp::export]]
bool connection_valid(XPtr<MyConnectionPtr> con) {
  return con.get() != NULL;
}
Esempio n. 3
0
// [[Rcpp::export]]
bool result_active(XPtr<PqResult> rs) {
  return rs.get() != NULL && rs->active();
}