How to find memory leak in JavaScript

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video I will tell you how to find memory leak in your JavaScript web application here I will create a sample JavaScript program to create memory leak then I will show you Chrome developer tool and then I will create data snapshot and compare and find the data in the memory here I have created sample JavaScript program that would create some data in the memory as you know the global variables always lives in the memory so I have created a variable hello list and added some array data to this variable the link to this program is also given in the description of this video now I will run this program in the Chrome after running the program in the Chrome open Chrome developer tools click on memory Tab and as you can see the Heap is Snapshot is by default selected is scroll down and click on take a snapshot so this is the initial memory snapshot before creating the global variables click on the profiles again now click on fill memory button as you can see after clicking on film memory some data has been added to the memory now click on take a snapshot now the second snapshot has been created now time to compare the data with the snapshot button so select the snapshot too then click on drop down summary and click on comparison and the snapshot one is by default selected if you have multiple snapshot in the left section you can select from the drop down but the most recent one is by default selected now here you can see some data and you can see some Delta as well as you have a array try to expand this array and look for your data you can try click on it and you will see hello list are existing in the memory you can also try clicking on this drop down and you can see the data in the array
Info
Channel: Level Up Lab
Views: 2,945
Rating: undefined out of 5
Keywords: JavaScript memory leak
Id: nKjadmYY09c
Channel Id: undefined
Length: 2min 1sec (121 seconds)
Published: Sat Oct 08 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.