We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf1ca46 commit 47c759bCopy full SHA for 47c759b
src/api/embed_helpers.cc
@@ -234,10 +234,10 @@ CommonEnvironmentSetup::~CommonEnvironmentSetup() {
234
impl_->platform->AddIsolateFinishedCallback(isolate, [](void* data) {
235
*static_cast<bool*>(data) = true;
236
}, &platform_finished);
237
- if (impl_->snapshot_creator.has_value())
+ if (impl_->snapshot_creator.has_value()) {
238
impl_->snapshot_creator.reset();
239
- else
240
- isolate->Dispose();
+ }
+ isolate->Dispose();
241
impl_->platform->UnregisterIsolate(isolate);
242
243
// Wait until the platform has cleaned up all relevant resources.
0 commit comments