JavaScript Memory Leaks and How To Fix Them

  Рет қаралды 23,034

Software Developer Diaries

Software Developer Diaries

Күн бұрын

Memory Management in JavaScript is often not a topic, but to avoid Memory Leaks in your web apps it's crucial to have a good understanding of how the Garbage Collector works, what can cause a Memory Leak, and how to analyze Memory Leaks with Chrome DevTools. In this video, I'm going to explain all of that.
======⚡⚡⚡======
Get a 20% discount on Brilliant.org (to learn Science, Technology, Engineering, and Math): brilliant.sjv.io/kjVO2z
======⚡⚡⚡======
🙌 Become my Patreon and get exclusive perks: / softdevdiaries
💼 Follow me on LinkedIn and drop me a message if you'd like: / gusgadirov
💻 Also, let's connect on GitHub: github.com/gusgad
📚 Resources:
Memory Management in JavaScript: developer.mozilla.org/en-US/d...
🕒 Timestamps:
(00:00) Memory Leaks explained
(03:57) Causes of a Memory Leak
(08:05) Identifying Memory Leaks
And don't forget to subscribe for more videos like this 😊

Пікірлер: 38
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries Жыл бұрын
And how do YOU guys detect and overcome memory leaks in your projects? Feel free to share your approaches below 😎
@AdarshNamboothiri
@AdarshNamboothiri Жыл бұрын
This video is surely going to be a life saver for me, Thank you
@darrenpierre9903
@darrenpierre9903 7 ай бұрын
wow this is a great video . I'm curious where did you learn how to use the developer tools for memory and performance ? I haven't used those tabs in my work but would love to do so in the future
@aokaziz6815
@aokaziz6815 5 ай бұрын
Useful content with crystal clear explanation
@paschalynukwuani6930
@paschalynukwuani6930 Жыл бұрын
You are so good with your explanation. Thank you.
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries Жыл бұрын
Happy to hear mate! Let me know if there's any topic you'd like me to make a video about :)
@fatimaiqra2169
@fatimaiqra2169 Ай бұрын
This video is really helpful, you explained very deeply, thanks a lot!
@user-vw3cx9gy9e
@user-vw3cx9gy9e 8 ай бұрын
Excellent and clear explanation, thanks:)
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 8 ай бұрын
Thank you too, happy to hear! :)
@Hala-os6ij
@Hala-os6ij Жыл бұрын
a GREAT explanation. thank you so much
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries Жыл бұрын
Glad it was helpful!
@criticalthinker88gis13
@criticalthinker88gis13 3 ай бұрын
Thanks, seems promising, ill try to use what i learned to identify and fix a mem leak at my now with it
@user-mr3ko8rz7j
@user-mr3ko8rz7j 11 ай бұрын
Great information and excellent presentation.
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 11 ай бұрын
Glad it was helpful!
@luck-xc7dy
@luck-xc7dy 7 ай бұрын
Hello, with the setTimeout memory leak. Does no variable ever get garbage collected inside of setTimeout, or is it just references to dom elements that dont get cleaned up. If you had node set = to 10 would it still have been a memory leak?
@salmanrana803
@salmanrana803 Жыл бұрын
Hey bro! Awesome content. In your third approach you are deleting the property "delete nodes.btn". But "useStrict" doesn't allow us to use "delete". What can be other way to do that?
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries Жыл бұрын
Hey hey, thanks for a great remark! Here's an article that I found, apparently it happens because the property is non-configurable. Maybe you can find something useful here :) developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cant_delete
@germanmartinezsolis9543
@germanmartinezsolis9543 Жыл бұрын
such a great video, I'm looking forward to see more content like this, you got a new sub.
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries Жыл бұрын
Happy to have you here, German :)
@user-qu8gi5id8p
@user-qu8gi5id8p Жыл бұрын
Wow Thanks a lot. It's what I want to know
@user-nt7tm4iw3t
@user-nt7tm4iw3t Жыл бұрын
Great explanation❤❤ Btw what is the tool u r using to draw and write ur explanation?
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries Жыл бұрын
Thank you my friend! It’s Excalidraw :)
@brinthkr1533
@brinthkr1533 Жыл бұрын
Awesome explanation 🎉
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries Жыл бұрын
Thank you!
@Petersonbabs
@Petersonbabs 4 ай бұрын
great video. What tool are you using for this explanation
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 4 ай бұрын
Excalidraw 😉
@paperC_CSGO
@paperC_CSGO Ай бұрын
Please do more browser dev tools stuff, especially performance in a big live site with loads of requests going on
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries Ай бұрын
I'm thinking about making a separate course on JS performance, so stay tuned!
@paperC_CSGO
@paperC_CSGO Ай бұрын
@@SoftwareDeveloperDiaries great news, thank you!
@MrFikret90
@MrFikret90 7 ай бұрын
This pretty interesting, but when it comes to determine memory leaks in app like Angular, it very difficult to find it. Because it's huge amount of functions in it, and names like "lj, H9, Xv"... not sure what all those functions comes from. Do you know how debug memory leaks in TypeScript apps? I believe it's after transpiler comes those names.
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 7 ай бұрын
Yes, you're right, it's quite challenging to find memory leaks when using JS frameworks. My suggestion would be to monitor the memory while you interact with the app, to at least be able to pin down the problem. Also, in the "Performance" tab, you can stumble upon you own methods, among framework-native methods, if you look close enough.
@itsall1sand0s
@itsall1sand0s Жыл бұрын
Amazing video❤ The fact that it has so less views and engagement makes me kinda sad
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries Жыл бұрын
Thanks for the kind words! 😊
@duongnguyen8853
@duongnguyen8853 3 ай бұрын
Hi, I am from VietNam, thank you for your video but I have a problem with my node server, I don't know how to debug the memory leaks in that Please help me, thank you so much
@ulashofficial
@ulashofficial Жыл бұрын
Thank you very much Software Developer Diaries! Fuuuuuuuuuuuuu
@ru2979
@ru2979 Жыл бұрын
wait what his name is foooo 👀😳🌬️🌬️🌬️?
@gaurishrane9818
@gaurishrane9818 7 ай бұрын
Very use full video ..
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 7 ай бұрын
Thank you :)
Finally Fix Your Issues With JS/React Memory Management 😤
20:13
Jack Herrington
Рет қаралды 81 М.
Универ. 10 лет спустя - ВСЕ СЕРИИ ПОДРЯД
9:04:59
Комедии 2023
Рет қаралды 2,1 МЛН
IS THIS REAL FOOD OR NOT?🤔 PIKACHU AND SONIC CONFUSE THE CAT! 😺🍫
00:41
The day of the sea 🌊 🤣❤️ #demariki
00:22
Demariki
Рет қаралды 54 МЛН
ТАМАЕВ vs ВЕНГАЛБИ. ФИНАЛЬНАЯ ГОНКА! BMW M5 против CLS
47:36
Memory Leakage as Fast As Possible
5:00
Techquickie
Рет қаралды 530 М.
Debugging memory leaks - HTTP 203
22:04
Chrome for Developers
Рет қаралды 44 М.
Garbage Collection (Mark & Sweep) - Computerphile
16:22
Computerphile
Рет қаралды 234 М.
Примеры утечек памяти в JavaScript
38:33
LN Master
Рет қаралды 6 М.
Mastering Memory Management in Node.js: Tips and Tricks for Better Performance
16:06
Software Developer Diaries
Рет қаралды 27 М.
Deep Dive into HTTP Caching: cache-control, no-cache, no-store, max-age, ETag and etc.
21:28
Enums considered harmful
9:23
Matt Pocock
Рет қаралды 194 М.
Настоящий детектор , который нужен каждому!
0:16
Ender Пересказы
Рет қаралды 435 М.
Телефон в воде 🤯
0:28
FATA MORGANA
Рет қаралды 916 М.
🔥Идеальный чехол для iPhone! 📱 #apple #iphone
0:36
Не шарю!
Рет қаралды 1,2 МЛН
Iphone or nokia
0:15
rishton vines😇
Рет қаралды 1,8 МЛН
МОЩНЕЕ ТВОЕГО ПК - iPad Pro M4 (feat. Brickspacer)
28:01
ЗЕ МАККЕРС
Рет қаралды 86 М.
i like you subscriber ♥️♥️ #trending #iphone #apple #iphonefold
0:14