3

My Google Chrome taskbar clearly tells me that I have a memory leak. I've checked that I'm flushing everything, but still haven't solved the problem.

Is there a way to determine what causes the leak using Google Chrome Developer Tools (or some other tool)?

Randomblue
  • 112,777
  • 145
  • 353
  • 547
  • Did you run a profile or an audit from the Developer Tools window? – qJake Oct 19 '11 at 16:06
  • Well I'm taking heap snapshots at various times, and comparing them. No significant leak seems to come from the heap. – Randomblue Oct 19 '11 at 16:11
  • 99% its the DOM. How bad is the leak ? Give us some numbers. – c69 Oct 19 '11 at 17:07
  • @c69: The leak is around 100MB per 15 minutes. And I'm pretty sure the DOM is being cleaned properly. – Randomblue Oct 19 '11 at 17:22
  • @Randomblue Bloody hell. What is your app doing ? – c69 Oct 19 '11 at 17:31
  • @c69: It's loading images from Flickr at a rate of 1 picture per second. I've made sure that any javascript reference is continuously cleaned and that the DOM is always cleaned also. I starting to think that it has to do with the way Google Chrome is dealing with the images. – Randomblue Oct 19 '11 at 18:35
  • 2
    lol, WebKit + lost of images (like more than 100) = trouble. Pure thing crashes even from slightest things like 1MB data:uri backgrounds. You should try checking this post - http://stackoverflow.com/questions/2986039/ipad-iphone-browser-crashing-when-loading-images-in-javascript – c69 Oct 19 '11 at 19:54
  • @c69: Thanks. That's probably the problem. I will double check that everything works fine on Firefox or IE. – Randomblue Oct 19 '11 at 20:08
  • `t.name="justin";` `var temp=t.name;` `t.name={};` this does not flush the object, be sure you're cleaning all references. – Vitim.us Nov 08 '11 at 21:14

1 Answers1

1

There is good article about memory leaks - http://gent.ilcore.com/2011/08/finding-memory-leaks.html