From 9702d4f7bfbd20e60f7255063f4475fa1e81289e Mon Sep 17 00:00:00 2001 From: huaqingsimeng <1004904143@qq.com> Date: Thu, 27 Apr 2023 17:59:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E4=BB=BD=E6=81=A2=E5=A4=8DNativeRefer?= =?UTF-8?q?ence=20=E8=B7=A8=E7=BA=BF=E7=A8=8B=E6=9E=90=E6=9E=84=E6=95=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huaqingsimeng --- frameworks/native/backup_ext/include/ext_backup_js.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frameworks/native/backup_ext/include/ext_backup_js.h b/frameworks/native/backup_ext/include/ext_backup_js.h index 6ec330fbd..ae0797887 100644 --- a/frameworks/native/backup_ext/include/ext_backup_js.h +++ b/frameworks/native/backup_ext/include/ext_backup_js.h @@ -127,7 +127,10 @@ public: public: explicit ExtBackupJs(AbilityRuntime::JsRuntime &jsRuntime) : jsRuntime_(jsRuntime) {} - ~ExtBackupJs() override = default; + ~ExtBackupJs() + { + jsRuntime_.FreeNativeReference(std::move(jsObj_)); + } private: std::tuple CallObjectMethod(std::string_view name, -- Gitee