Update 101-debugging-memory-leaks.md (#2010)
Co-authored-by: Kamran Ahmed <kamranahmed.se@gmail.com>pull/2136/head
parent
dabe4c421a
commit
7f2a180a9e
1 changed files with 5 additions and 4 deletions
@ -1,7 +1,8 @@ |
||||
# Debugging memory leaks |
||||
# Debugging Memory Leaks |
||||
|
||||
A memory leak happens when a process or the programmer creates a reference to a memory in the heap, but then does not delete it once it is no longer needed. This results in less memory being available to the application, reducing performance. |
||||
|
||||
Unlike languages like C, in which the developer has to take full responsibility of memory management using functions such as `malloc()`, JavaScript has inbuilt garbage collection which does a lot of work for you. However, it is not perfect. Give a read to the article below for a rundown of common causes of unresolved memory leaks and how to solve them using dev tools. |
||||
In JavaScript, memory leaks commonly occur within heap allocated memory, where short lived objects are attached to long lived ones and the Garbage Collector cannot safely de-allocate that memory as it is still referenced from the root set (the global object). |
||||
|
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://medium.com/coding-blocks/catching-memory-leaks-with-chrome-devtools-57b03acb6bb9'>Catching memory leaks with Chrome DevTools</BadgeLink> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://medium.com/swlh/effective-javascript-debugging-memory-leaks-75059b2436f6'>Effective Javascript Debugging </BadgeLink> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.debugbear.com/blog/debugging-javascript-memory-leaks'>Debugging JavaScript memory leaks</BadgeLink> |
||||
<BadgeLink colorScheme='yellow' badgeText='Read' href='https://www.jackhoy.com/web-applications/2020/10/21/debugging-memory-leaks-in-nodejs.html'>Debugging Memory Leaks In Production JavaScript Applications</BadgeLink> |
Loading…
Reference in new issue