简体   繁体   中英

Using chrome to detect memory leaks

I'm having troble with memory leaks on the page. Here is how my time line looks like:

在此处输入图片说明

I know which JS function causes leaks, but I can't figure out which part of it does it. When I try to take heap snapshot in Profile menu - there is complyteley different information - it shows, that I'm using only 28MB of memory (how it's compared to timeline numbers??)

在此处输入图片说明

Is there a way to find out what exact nodes are created and by what part of the js function?

If the peak memory usage is not growing throughout time then I would not deem it a memory leak as the Javascript engine is free to choose when to garbage collect. It is more efficient for the engine to allow the program to run freely while it periodically performs a mark and sweep of unused objects to clear it up.

I can't answer the other question about the mismatch in size I'm afraid.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM