Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript React Components (2018) Stateful Components and Lifecycle Methods Prevent Memory Leaks with componentWillUnmount()

What is memory leak?

What is memory leak? Guil did not explain the concept of momory leak in this video. Anyone can brefly explain? Thank you

2 Answers

Steven Parker
Steven Parker
229,644 Points

Essentially, the term "memory leak" describes a situation where a process repeatedly allocates additional memory resources but does not release them, or perhaps only releases some of them. So as the process continues to run, available memory resources continue to be consumed until there are not enough to continue; and then an out-of-memory condition causes the program to terminate.

Guil Hernandez
STAFF
Guil Hernandez
Treehouse Teacher

Hi Ran Wang,

00:25 - 1:15 of the video is one example of a memory leak. :)

Sry, Guil, my bad : )