title: javascript memory leak
body: <p>I have a some javascript (used with google maps api) that I am testing on IE and Chrome and noticed memory leak symptoms in IE only: when I refresh the page continuously, the amount of memory used in IE keeps growing (fast), but in Chrome it stays constant.  Without posting all of the code (as it is rather long), can I get some suggestions as to what to look out for?  What could cause the memory to keep growing like this in IE on page refreshes?</p>
  
  <p>Like I said I know its hard without code, but I'd like to see if any generic advice works first.  Thanks.</p>
  
  <p><strong>Update</strong>: thanks for the responses so far.  As a sanity check, I ran the google maps api "Hello World" code <a href="http://code.google.com/apis/maps/documentation/javascript/introduction.html" rel="noreferrer">from google</a> to see what would happen in IE (the code is shown below).  When running this code in IE, when I keep refreshing the page over and over again, the memory keeps growing and growing.  Is this a memory leak? This doesnt seem like intended functionality...</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;meta name="viewport" content="initial-scale=1.0, user-scalable=no" /&gt;
  &lt;script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
    function initialize() {
      var latlng = new google.maps.LatLng(-34.397, 150.644);
      var myOptions = {
        zoom: 8,
        center: latlng,
        mapTypeId: google.maps.MapTypeId.ROADMAP
      };
      var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
    }
  
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body onload="initialize()"&gt;
    &lt;div id="map_canvas" style="width:100%; height:100%"&gt;&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>Update 2</strong>: So is there no way to get this google Hello World map api code to run without leaking memory in IE?  I noticed that if I run the same experiment on <a href="http://maps.google.com" rel="noreferrer">maps.google.com</a> there doesn't seem to be a leak...It would be great if someone could help me modify the hello world code so that it does not leak in IE; this way I can build off of it (I don't mind using JQuery if this would help, but I tried it on the Hello World code and it was still leaking in IE).  Thanks again</p>