Update 101-debugging-memory-leaks.md (#2010)

Co-authored-by: Kamran Ahmed <kamranahmed.se@gmail.com>
pull/2136/head
shagun199 2 years ago committed by GitHub
parent dabe4c421a
commit 7f2a180a9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      content/roadmaps/106-javascript/content/117-javascript-chrome-dev-tools/101-debugging-memory-leaks.md

@ -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. 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).
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.
<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/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…
Cancel
Save