DeepFrontend
Learning Paths
Practice
System Design & DS
Design Studio
Data Structures Curriculum
Real-World Case Studies
Careers
Job Board
Resume Builder
Blog
Sign in
Search
⌘K
Go Pro
Loading compiler resources...
Frontend Performance Quiz Practice
Active Recall Drill Session
← Exit Session
Question 1 of 1
medium
Frontend Performance
In the Implement It Yourself example, why does simulateFixedOperation() NOT contribute to heap growth the way simulateLeakyOperation() does?
A
Both functions actually behave identically
B
temp in simulateFixedOperation() goes out of scope once the function returns, with nothing else referencing it — genuinely unreachable and collectible, unlike the leaky version's data pushed into a persistent, reachable array
C
simulateFixedOperation() uses less memory per call regardless of scope
D
The difference is due to array size, not reachability
Check Answer