mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat: Provide API to release the native object wrapped by a JS one (#6873)
* Add `releaseNativeObject` function in `utils` * Add tests * Add typings for the global `__releaseNativeCounterpart` functions provided by Android and iOS runtimes refs https://github.com/NativeScript/ios-runtime/issues/1062 and https://github.com/NativeScript/android-runtime/issues/1254
This commit is contained in:
committed by
Svetoslav
parent
9f8d24a811
commit
8b4a9b3c6b
@@ -206,6 +206,10 @@ export function GC() {
|
||||
gc();
|
||||
}
|
||||
|
||||
export function releaseNativeObject(object: java.lang.Object) {
|
||||
__releaseNativeCounterpart(object);
|
||||
}
|
||||
|
||||
export function openUrl(location: string): boolean {
|
||||
const context = ad.getApplicationContext();
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user