1

Every time when I take a heap snapshot after doing some operation to my web page the size increases by 3 to 4 MB. If I continue doing it 10 to 15 Times the size of heap snapshot increases up to 100 MB. Does it prove that my app has a memory leak?

The operation I perform is a search operation yielding same results every time.

Aashish Upadhyay
  • 840
  • 1
  • 7
  • 22
  • Possibly. Just because your operation returns the same results doesn't mean you're not doing something like creating new objects or event handlers or the like every time the operation is executed and then not cleaning up those objects or references to them. – ajp15243 Apr 17 '15 at 04:08
  • @ajp15243 : Should I check the timeline view or this is enough to substantiate the fact that I do have a memory leak? – Aashish Upadhyay Apr 17 '15 at 04:11
  • I think the heap snapshot alone tells you there's memory leakage, since your operation is creating new things that aren't gotten rid of or reused the next time the operation is executed, which is manifested in the increasing heap size when you've presumably done nothing but run the operation. I'm not exactly an expert on the Timeline view, but I think that will tell you more information on what is being created. You might be able to use that along with the debugger if you need to figure out exactly what is being created that takes up memory and when it's created. – ajp15243 Apr 17 '15 at 04:15

1 Answers1

0

Lets use the recipe from this answer Tool to track down JavaScript memory leak. It could show you the leaked items.

Community
  • 1
  • 1
loislo
  • 14,025
  • 1
  • 28
  • 24