@@pixelstriko1642 Few days earlier I would've said that Rust doesn't technically prevent memory leaks, but it does make it harder. However I remember Primeagen saying that it's hard to keep Rust in long-running processes as it (or rather some popular framework) does leak memory.
90% of JS developers don’t care about *anything*, period. An alarming amount of people who do JS don’t give a damn about performance, security, maintainability or anything like that. They just want to get stuff done even if it’s as quickly and dirty as possible. The language is way too forgiving, and without a linter or anything, it allows people to create some of the most cursed things this planet has ever seen.
A series of long videos with the complete process to fix common or tricky issues would be great. These issues are like Nessy, they tell you about it but they never really show you.
This man could literally post a 3 second video on anything and it will still be the most fun, visually incredible and best narrated coding video on the platform. Love it!
Me, who uses C or C++ most of the time: Memory Leaks in JavaScript? I thought it had a Garbage Collector... Edit: Folks, I watched and understand the video. You don't need to explain it to me over and over again...
I think thats the way to leak Yk create objects that are referenced but useless It can heppen with react when you register an event meant to change a component, but that component is gone The event listener still fires and changes the dead component object, which is dangling only from the closure
@@mvpuccino i mean it does, but there are some events which are global, like timers for ex. it does not get scoped to a function stack frame, and these need to be managed manually.
You can't garbage collect data that is still being referenced. If you have a huge array that is only referenced in one variable, the trick is to set that variable to null or empty array. The big array will eventually be garbage collected, but if you don't do that it will stay in memory forever.
>GC can't do its job, because you are storing your objects somewhere, so you have a memory leak Why people call it memory leak if it's just a garbage code. Memory leak happens if you lose a pointer to allocated object and there is no way how to remove it. In situation described above, it's just a garbage code where a you don't understand a purpose of allocated objects and their life time.
Heyy few days ago I was studying about javascript performance and memory management topics which includes memory leaks and garbage collections, I was searching in youtube and googling 4-5 hours about those subjects and now firebase uploads this video xD is this a coincident ? I think he is tracking my device :(((
You don't even have to use the performance panel. Just go the settings - task manager in chrome. In the task manager turn on the JavaScript memory column and check for any tab that is seemly doing nothing but the memory usage keeps going up and up. That is the sure sign of a memory leak.
Unless your memory leak is due to an . Then you will only solve it by commenting and uncommenting out every single piece of code until you find the cause.
@@softwarelivre2389 But how do you import stuff you need only once? In node you can do return require('foo').bar(arg); Besides that require is a function which makes it more flexible.
@@user-he4ef9br7z require is a legacy method of importing code, one that I've never seen anyone like more than the ES6 method before this day. I'm a bit surprised, for sure. Anyway, even Node doesn't use it anymore because it is weak, limited and less reliable, but they for sure are not doing it the correct way.
Full stack devs treat front-end as make it pretty kind of notation. Like dude, where the fuck is your security, why is the website freezing, theres no state here, why is this global, the fuck is this middleware. etc.
Rust does not consider memory leak unsafe. In Rust, you may accidentally cause memory leak by creating circular smart pointers (Rc, Arc), you can also intentionally cause memory leak by calling std::mem::forget.
I discovered the shop I hand programmed for my games website literally was referencing every item from every page loaded in memory yet still creating new items when the same category that had already been loaded was selected again
"Now it's upto you to fix it" the wisest and the most useless advice at the same time
"if it keeps going up up and up it means you fucked up, fix it" lol
@@RodrigoSalesSilva 😂😂
Just stop the leakage duh..
facts
Memory leak is just like an angry wife , you can't it control without skills
I just love how Jeff finds the best fitting gif for every situation
He should do a tutorial on it.
Popeye knotting the water was hilarious
his name is jeff?
@@brhh Yeah
He's using a vector database. He's got a tutorial on beyond fireship I think
Would kill for a 10 min vid on practical memory leak fixing.
Yes please Chris!!!
Ever heard of Rust?
Every time it is literally fucking lottery and each time it is something completely new and random, no way you can do tutorial on this.
fuite js 😉
@@pixelstriko1642 Few days earlier I would've said that Rust doesn't technically prevent memory leaks, but it does make it harder. However I remember Primeagen saying that it's hard to keep Rust in long-running processes as it (or rather some popular framework) does leak memory.
Clear and concise. I like it!
Idk why I read your comment as clear as cocaine
To avoid memory leak
The "more you know" melody at the end is :chefs-kiss
Man your shorts are lit. One can say they are .... ON FIRE! 🔥😎
Badum tss
Tru
A moment of silence for those poor souls who actually needed to fix a memory leak right after this video has ended.
Youre welcome
I needed to use it like 5 minutes ago, nice coincidence
sure you were
sure you were
Hello search engine God
Sure u never got targeted recommended content front of Internet lol
"Now it's upto you to fix it" The most dreaded part. 💀
90 % JS developer doesn't care this problem. The main problem of Chrome eats rams because of bad coded JS frontend.
this ^^
This must get pinned
90% of JS developers don’t care about *anything*, period. An alarming amount of people who do JS don’t give a damn about performance, security, maintainability or anything like that. They just want to get stuff done even if it’s as quickly and dirty as possible. The language is way too forgiving, and without a linter or anything, it allows people to create some of the most cursed things this planet has ever seen.
No. It's because of how badly chromium was written.
If you're comparing it to Firefox, then you should know the two aren't different.
Browsers dev tools are so overwhelmingly generous and forgiving that developers take for granted.
A series of long videos with the complete process to fix common or tricky issues would be great.
These issues are like Nessy, they tell you about it but they never really show you.
To show power of the Flex Tape, I sawed this RAM in half.
You are my Great Inspiration Sir!...Love you content , Watching it from Nepal...
"You have a memory leak ?"
"Solution : Don't"
Each of his shorts videos is a piece of art
This man could literally post a 3 second video on anything and it will still be the most fun, visually incredible and best narrated coding video on the platform. Love it!
Garbage collection is every Friday, with recycling every second Friday... Just have to write that into the logic. 🤡
Me, who uses C or C++ most of the time:
Memory Leaks in JavaScript? I thought it had a Garbage Collector...
Edit: Folks, I watched and understand the video. You don't need to explain it to me over and over again...
Me registering an event listener every frame
I think thats the way to leak
Yk create objects that are referenced but useless
It can heppen with react when you register an event meant to change a component, but that component is gone
The event listener still fires and changes the dead component object, which is dangling only from the closure
@@mvpuccino i mean it does, but there are some events which are global, like timers for ex. it does not get scoped to a function stack frame, and these need to be managed manually.
Only objects that are no more referenced are eligible to garbage collector
You can't garbage collect data that is still being referenced. If you have a huge array that is only referenced in one variable, the trick is to set that variable to null or empty array. The big array will eventually be garbage collected, but if you don't do that it will stay in memory forever.
It would be very helpful..
If you make a slow, janky and frozen website and then tought us how to fix it...
>GC can't do its job, because you are storing your objects somewhere, so you have a memory leak
Why people call it memory leak if it's just a garbage code. Memory leak happens if you lose a pointer to allocated object and there is no way how to remove it. In situation described above, it's just a garbage code where a you don't understand a purpose of allocated objects and their life time.
I'm just getting started with web development I'm not sure what most of these shorts mean but I know that I'm going to need them
The popeye has fixed two water leakage at once. 🔥😂
I miss the dial up connection in the 90s, when displaying alert box and frames on web pages were something.
Holy shit out of 10 articles vs 40 second video, this is how one should explain short topics. Wonderful
Come for the memes, stay for content.
an actual important topic and you didn't went all in, sadge
Instructions unclear, patient lost all memories.
Rust in 100 seconds
I'm offended that RUclips recommended this video to me.
Memory leak is just like an angry wife , you can't control it without skills
I love the photos and videos you are using in your videos 😂
A full video on the subject would be interresting :D
Anybody else but stop laughing when he saw where he got the lighter!?
"Now it's up to you to fix it" 🥲
Heyy few days ago I was studying about javascript performance and memory management topics which includes memory leaks and garbage collections, I was searching in youtube and googling 4-5 hours about those subjects and now firebase uploads this video xD is this a coincident ? I think he is tracking my device :(((
Perfectly timed video. for my situation at work
This topic deserves much more than just 40 secs
You don't even have to use the performance panel. Just go the settings - task manager in chrome. In the task manager turn on the JavaScript memory column and check for any tab that is seemly doing nothing but the memory usage keeps going up and up. That is the sure sign of a memory leak.
Now i'm curious to check my old projects and SEE how fkup they were
Actually learned something new, thank you
Me typing "tail /dev/zero"
Linux: *I don't feel so good*
Short and clear, nice.
You can also see more about the Critical Rendering Path (DOM, CSSOM...) on the performance tab.
"Now it's up to you to fix it"
*groans*
Right on time, I need this like today for an application I am trying to launch.
There should be more channels like this one…
I didn't even know that was possible with javascript.
This channel is dope af.
My brain has a memory leak too but whatever
Can you make video on new Angular Chrome Extension. And how to optimize performance of an Angular App. And how to Debug Profiler.
"Is your memory leaking?"
Fnf corruption fans: Quite literally
Many of us don't know hidden gems in Chrome dev tools.
... there are more.
In the Firefox dev edition :)
Firefox dev tools are superior IMO
JS devs: This seems hard to fix.
C and C++ devs: Hire us! We will solve the problem in a minute.
I reckon if this video was about 15 seconds longer it would have been the most useful video on youtube...
I was just researching how to identify memory leaks in my React Native app when I found this on my feed. Spooky.
Popeye is the TRUE water bender!
Direct to the point
Unless your memory leak is due to an . Then you will only solve it by commenting and uncommenting out every single piece of code until you find the cause.
after laracasts, this is the best channel on internet for me.
Just put it in the backlog. And forget about it.
Like the name
Your videos are Fire
Look up on google "how to tell if you have dementia"
Notice that you already visited all the links.
"Shid the memory is leaking".
A lot of festival websites with flashy animations seem to have this
Google:"No i dont think i will"
"its up yo you to fix it"
means : "ain't gonna deal with those garbage"
Best youtube channel ever 🤟
slow down... how do we fix it ?
remove the refrence to the object/value
I'll explain that in a future video.
use web assembly
Pop eye the sailor man! Toot toot!
Should I be worried if it's flat line? 🤔
If it's not broken don't fix it. If it's leaking, well, it's leaking.
Instruction unclear
Deleted OS
No, my diaper is. Now please change me.
Very useful ! but how should we release the heap ?
Users at this time: "Why not just write without bugs?" :D
did you recorded it on your smartphone ?
Can you please make a quick understandable video/demo of require() and module. exports, differences with import
Good'n'old CommonJS. The main reason I ditched Node.js and migrated to Deno.
@@softwarelivre2389 But how do you import stuff you need only once?
In node you can do
return require('foo').bar(arg);
Besides that require is a function which makes it more flexible.
@@user-he4ef9br7z import { element } from "./modules/my_module.js";
@@user-he4ef9br7z require is a legacy method of importing code, one that I've never seen anyone like more than the ES6 method before this day. I'm a bit surprised, for sure. Anyway, even Node doesn't use it anymore because it is weak, limited and less reliable, but they for sure are not doing it the correct way.
Memory leak in Javascript? :O My goodness, gotta have pretty low standards to be dealing with this issue?
Full stack devs treat front-end as make it pretty kind of notation. Like dude, where the fuck is your security, why is the website freezing, theres no state here, why is this global, the fuck is this middleware. etc.
Blazor in 100 seconds!!! Would be interesting to see a replacement for js in the client side.
Ive subbed and changed the bell to 'All' but I didnt get a notification? Do shorts not count?
Better don’t use JavaScript at all because it’s insecure
Actually you should compare snapshots instead of looking at just the one
they invented a gc to prevent leaks
Wow. New super power unlocked!
What about a WebGL game made with js? It uses about 600 ram, but heap usage only shows 30Mb. Help please:)
just don't use any memory problem solved
If you're website has leaked. Then you are shit out of luck until you fix it!
In this regard Firefox is way better. It provides you with nice colorful memory map and you can make snapshots persistent.
Where do you get these gifs and jpgs? The smoking fat guy is an old meme on Chinese Internet about ten years ago.
Love the end lol
Next video: how to fix memory leak
My Zen Master...Hail Massa...
Love the info, but absolutely hate the format. Please keep short video to Tim Tok only 🙏🏼
You're now my favorite tiktoker
Rust: What’s a leak?
Rust does not consider memory leak unsafe.
In Rust, you may accidentally cause memory leak by creating circular smart pointers (Rc, Arc), you can also intentionally cause memory leak by calling std::mem::forget.
rust doesn't prevent leaks in the slightest, RC's can leak and there's nothing rust can do about it
its the garbage collector for me
I discovered the shop I hand programmed for my games website literally was referencing every item from every page loaded in memory yet still creating new items when the same category that had already been loaded was selected again
Wow, this has good knowledge but I lack the intelligence to understand
*now it's up to you to fix it* 💀