Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b74e22cb authored by Shai Barack's avatar Shai Barack
Browse files

Properly manage JniStringCache lifecycle and clear on unload.

The `JniStringCache` singleton is now initialized using `std::call_once` and a global pointer. A `JNI_OnUnload` function is added to clear the cache and delete the singleton instance, ensuring that global JNI references are released when the library is unloaded.

With this change we successfully pass hwasan:
https://android-build.corp.google.com/builds/abtd/run/L01400030017696946

Bug: 443493398
Flag: EXEMPT BUGFIX
Change-Id: I5474a64ec7146b638094f792c8f2bb47254c0449
parent dc5fa92e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment