mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 01:58:16 +00:00
Implement close
This commit is contained in:
parent
d51c1dc5b1
commit
e0b0a667bb
1 changed files with 9 additions and 1 deletions
|
@ -21,7 +21,6 @@ impl LimboDB {
|
|||
Box::into_raw(Box::new(self)) as jlong
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn drop(ptr: jlong) {
|
||||
let _boxed = unsafe { Box::from_raw(ptr as *mut LimboDB) };
|
||||
}
|
||||
|
@ -97,6 +96,15 @@ pub extern "system" fn Java_org_github_tursodatabase_core_LimboDB_connect0<'loca
|
|||
conn.to_ptr()
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "system" fn Java_org_github_tursodatabase_core_LimboDB_close0<'local>(
|
||||
_env: JNIEnv<'local>,
|
||||
_obj: JObject<'local>,
|
||||
db_pointer: jlong
|
||||
) {
|
||||
LimboDB::drop(db_pointer);
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "system" fn Java_org_github_tursodatabase_core_LimboDB_throwJavaException<'local>(
|
||||
mut env: JNIEnv<'local>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue