Home
last modified time | relevance | path

Searched refs:HandleScopeWrapper (Results 1 – 3 of 3) sorted by relevance

/ohos5.0/docs/zh-cn/application-dev/napi/
H A Djsvm-guidelines.md36 class HandleScopeWrapper {
38 HandleScopeWrapper(JSVM_Env env) : env(env) {
42 ~HandleScopeWrapper() {
46 HandleScopeWrapper(const HandleScopeWrapper&) = delete;
47 HandleScopeWrapper& operator=(const HandleScopeWrapper&) = delete;
48 HandleScopeWrapper(HandleScopeWrapper&&) = delete;
63 // 每次for循环结束后,触发HandleScopeWrapper的析构函数,释放scope持有的js对象
66 HandleScopeWrapper scope(env);
70 // break退出循环后会自动调用HandleScopeWrapper析构函数释放资源
/ohos5.0/docs/en/application-dev/napi/
H A Djsvm-guidelines.md36 class HandleScopeWrapper {
38 HandleScopeWrapper(JSVM_Env env) : env(env) {
42 ~HandleScopeWrapper() {
46 HandleScopeWrapper(const HandleScopeWrapper&) = delete;
47 HandleScopeWrapper& operator=(const HandleScopeWrapper&) = delete;
48 HandleScopeWrapper(HandleScopeWrapper&&) = delete;
63 // After each for loop ends, trigger the destructor function of HandleScopeWrapper to release the J…
66 HandleScopeWrapper scope(env);
70 …// After the loop exits, the HandleScopeWrapper destructor is automatically called to release reso…
/ohos5.0/foundation/arkui/napi/native_engine/
H A Dnative_api.cpp72 class HandleScopeWrapper { class
74 explicit HandleScopeWrapper(NativeEngine* engine) : scope_(engine->GetEcmaVm()) {} in HandleScopeWrapper() function in HandleScopeWrapper
102 inline napi_handle_scope HandleScopeToNapiHandleScope(HandleScopeWrapper* s) in HandleScopeToNapiHandleScope()
107 inline HandleScopeWrapper* NapiHandleScopeToHandleScope(napi_handle_scope s) in NapiHandleScopeToHandleScope()
109 return reinterpret_cast<HandleScopeWrapper*>(s); in NapiHandleScopeToHandleScope()
2223 *result = HandleScopeToNapiHandleScope(new HandleScopeWrapper(engine)); in napi_open_handle_scope()