mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-18 17:14:20 +01:00
Implement close
This commit is contained in:
@@ -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>,
|
||||
|
||||
Reference in New Issue
Block a user