From 4a9955f448c3e50d1921259f0f605cbd63b61a68 Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Tue, 19 Apr 2022 15:43:50 +0200 Subject: [PATCH] Release ndk-glue-0.4.2 to clean up ndk-context-0.1.1 `AndroidContext` --- ndk-glue/CHANGELOG.md | 4 ++++ ndk-glue/Cargo.toml | 4 ++-- ndk-glue/src/lib.rs | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ndk-glue/CHANGELOG.md b/ndk-glue/CHANGELOG.md index 43c0f9b5..61366268 100644 --- a/ndk-glue/CHANGELOG.md +++ b/ndk-glue/CHANGELOG.md @@ -1,5 +1,9 @@ # Unreleased +# 0.4.2 (2022-04-19) + +- Call `ndk_context::release_android_context()` function to remove `AndroidContext` when activity is destroyed. (#263) + # 0.4.1 (2022-02-15) - Initialize `ndk-context` for cross-version access to the Java `VM` and Android `Context`. diff --git a/ndk-glue/Cargo.toml b/ndk-glue/Cargo.toml index 767d414e..21b33924 100644 --- a/ndk-glue/Cargo.toml +++ b/ndk-glue/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ndk-glue" -version = "0.4.1" +version = "0.4.2" authors = ["The Rust Windowing contributors"] edition = "2018" description = "Startup code for android binaries" @@ -13,7 +13,7 @@ repository = "https://github.com/rust-windowing/android-ndk-rs" [dependencies] ndk = { path = "../ndk", version = "0.4.0" } -ndk-context = "0.1.0" +ndk-context = "0.1.1" ndk-macro = { path = "../ndk-macro", version = "0.2.0" } ndk-sys = { path = "../ndk-sys", version = "0.2.1" } lazy_static = "1.4.0" diff --git a/ndk-glue/src/lib.rs b/ndk-glue/src/lib.rs index f36c9e4e..4409a177 100644 --- a/ndk-glue/src/lib.rs +++ b/ndk-glue/src/lib.rs @@ -243,6 +243,7 @@ unsafe extern "C" fn on_stop(activity: *mut ANativeActivity) { unsafe extern "C" fn on_destroy(activity: *mut ANativeActivity) { wake(activity, Event::Destroy); + ndk_context::release_android_context(); } unsafe extern "C" fn on_configuration_changed(activity: *mut ANativeActivity) {