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

Ran Wang
Ran Wang
Full Stack JavaScript Techdegree Graduate 27,980 Points

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
171,345 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. :)