CS Fundamentals Trainer · JavaScript · Performance & Memory
Put these events in the life of one long-lived object in V8 in order, first to last.
- A major mark-compact GC of the old generation reclaims its memory
- After surviving another scavenge, it is promoted to the old generation
- It survives a minor GC (scavenge) because it is still reachable
- The object is allocated in the young generation
- The program drops its last reference to the object
Difficulty: medium