Skip to content

Commit

Permalink
src: do not track BaseObjects directly in Realm
Browse files Browse the repository at this point in the history
They are referenced through the CleanupQueue which is already
tracked. Tracking them again in Realms results in duplicates in
the heap snapshot.
  • Loading branch information
joyeecheung committed Jan 31, 2023
1 parent b8b92ca commit c49c39b
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/node_realm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ void Realm::MemoryInfo(MemoryTracker* tracker) const {
tracker->TrackField("cleanup_queue", cleanup_queue_);
tracker->TrackField("builtins_with_cache", builtins_with_cache);
tracker->TrackField("builtins_without_cache", builtins_without_cache);

ForEachBaseObject([&](BaseObject* obj) {
if (obj->IsDoneInitializing()) {
tracker->Track(obj);
}
});
}

void Realm::CreateProperties() {
Expand Down

0 comments on commit c49c39b

Please sign in to comment.