mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 07:01:24 +00:00
使用HintGC接口触发GC
Signed-off-by: wangyang2022 <wangyang412@huawei.com> Change-Id: I0d51b76a87d13521ec4e44e001dfb17d90b09e68
This commit is contained in:
parent
952afb17a3
commit
f66ef2f105
@ -263,14 +263,14 @@ void ArkJSRuntime::RunGC()
|
||||
{
|
||||
JSExecutionScope executionScope(vm_);
|
||||
LocalScope scope(vm_);
|
||||
JSNApi::TriggerGC(vm_, panda::ecmascript::GCReason::TRIGGER_BY_ARKUI, JSNApi::TRIGGER_GC_TYPE::SEMI_GC);
|
||||
JSNApi::HintGC(vm_, JSNApi::MemoryReduceDegree::LOW, panda::ecmascript::GCReason::TRIGGER_BY_ARKUI);
|
||||
}
|
||||
|
||||
void ArkJSRuntime::RunFullGC()
|
||||
{
|
||||
JSExecutionScope executionScope(vm_);
|
||||
LocalScope scope(vm_);
|
||||
JSNApi::TriggerGC(vm_, panda::ecmascript::GCReason::TRIGGER_BY_ARKUI, JSNApi::TRIGGER_GC_TYPE::FULL_GC);
|
||||
JSNApi::HintGC(vm_, JSNApi::MemoryReduceDegree::HIGH, panda::ecmascript::GCReason::TRIGGER_BY_ARKUI);
|
||||
}
|
||||
|
||||
shared_ptr<JsValue> ArkJSRuntime::NewInt32(int32_t value)
|
||||
|
Loading…
Reference in New Issue
Block a user