Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript React Components 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
212,047 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 : )