LWC questionsQuestion 105 of 168
LWCIntermediateCode Reviewlifecycleconnectedcallbackmemory-leak
Fix memory leak from setInterval in connectedCallback without cleanup
Scenario
Dashboard LWC polls Apex every 5 seconds via setInterval in connectedCallback but disconnectedCallback is empty; users report browser slowdown after hours in console.
Answer it out loud first
Serious prep means attempting before reading. Take two minutes to structure your answer, then compare.