Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions test-app/runtime/src/main/cpp/ObjectManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,8 @@ void ObjectManager::JSObjectFinalizer(Isolate *isolate, ObjectWeakCallbackState

if (jsInstanceInfo == nullptr) {
po->Reset();
delete po;
delete callbackState;
return;
}

Expand All @@ -341,6 +343,9 @@ void ObjectManager::JSObjectFinalizer(Isolate *isolate, ObjectWeakCallbackState
auto jsInfoIdx = static_cast<int>(MetadataNodeKeys::JsInfo);
po->Get(m_isolate)->SetInternalField(jsInfoIdx, Undefined(m_isolate));
po->Reset();
m_idToObject.erase(javaObjectID);
delete po;
delete callbackState;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, thanks, we'll add that.

}

Expand Down