Skip to content

Commit

Permalink
fix(voltron): fix voltron android scope not erase when destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
lvfen authored and zealotchen0 committed Jul 25, 2023
1 parent c9cedd1 commit eebd7a1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions framework/voltron/core/src/bridge/android/bridge_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,18 @@ void BridgeImpl::Destroy(int64_t scope_id,
engine_holder.erase(it);
}
}

voltron::EraseObject(footstone::checked_numeric_cast<
int64_t,
uint32_t>(scope_id));
JsDriverUtils::DestroyInstance(engine, scope, [callback](bool ret) {
if (ret) {
callback(INIT_CB_STATE::SUCCESS);
} else {
callback(INIT_CB_STATE::DESTROY_ERROR);
}
}, is_reload);
scope = nullptr;
}

void BridgeImpl::LoadInstance(int64_t scope_id,
Expand Down

0 comments on commit eebd7a1

Please sign in to comment.