mirror of
https://gitee.com/openharmony/global_i18n
synced 2025-03-01 12:26:03 +00:00
release addon object
Signed-off-by: sunyaozu <sunyaozu@huawei.com>
This commit is contained in:
parent
3b06643e57
commit
963e21af8c
@ -96,7 +96,8 @@ void I18nAddon::Destructor(napi_env env, void *nativeObject, void *hint)
|
||||
if (!nativeObject) {
|
||||
return;
|
||||
}
|
||||
reinterpret_cast<I18nAddon *>(nativeObject)->~I18nAddon();
|
||||
delete reinterpret_cast<I18nAddon *>(nativeObject);
|
||||
nativeObject = nullptr;
|
||||
}
|
||||
|
||||
napi_value I18nAddon::CreateUnicodeObject(napi_env env, napi_status &initStatus)
|
||||
|
@ -39,7 +39,8 @@ void IntlAddon::Destructor(napi_env env, void *nativeObject, void *hint)
|
||||
if (!nativeObject) {
|
||||
return;
|
||||
}
|
||||
reinterpret_cast<IntlAddon *>(nativeObject)->~IntlAddon();
|
||||
delete reinterpret_cast<IntlAddon *>(nativeObject);
|
||||
nativeObject = nullptr;
|
||||
}
|
||||
|
||||
napi_value IntlAddon::SetProperty(napi_env env, napi_callback_info info)
|
||||
|
Loading…
x
Reference in New Issue
Block a user