efree(res);
}
+static int _clean_unfinished_results(zend_rsrc_list_entry *le, void *db TSRMLS_DC)
+{
+ if (Z_TYPE_P(le) == le_sqlite_result) {
+ struct php_sqlite_result *res = (struct php_sqlite_result *)le->ptr;
+ if (res->db->rsrc_id == ((struct php_sqlite_db*)db)->rsrc_id) {
+ real_result_dtor(res TSRMLS_CC);
+ }
+ }
+ return 0;
+}
+
static ZEND_RSRC_DTOR_FUNC(php_sqlite_result_dtor)
{
struct php_sqlite_result *res = (struct php_sqlite_result *)rsrc->ptr;
DB_FROM_ZVAL(db, &zdb);
}
+ zend_hash_apply_with_argument(&EG(regular_list),
+ (apply_func_arg_t) _clean_unfinished_results,
+ db TSRMLS_CC);
+
zend_list_delete(Z_RESVAL_P(zdb));
}
/* }}} */