title: Google Maps JS v3 - detached DOM tree - memory leak?
body: <p>I have the following issue. I am removing all references to a google maps instance including markers via the <code>setMap(null)</code> option via the following code: </p>
  
  <pre><code>destroyMaps = function () {
      leftMap = null;
      window.map = null;
      geocoder = null;
      for (var i=0; i&lt;window.rightMarkers.length; i++) {
          window.rightMarkers[i].setMap(null);
          window.rightMarkers[i] = null;
      }
      window.rightMarkers = null;
      $("#map-canvas-right").remove();
  
      for (var i=0; i&lt;window.leftMarkers.length; i++) {
          window.leftMarkers[i].setMap(null);
          window.leftMarkers[i] = null;
      }
      window.leftMarkers = null;
      $("#map-canvas-left").remove();
  
  }
  </code></pre>
  
  <p>The only things that reference <code>leftMap</code> or <code>window.map</code> in  my whole code is:</p>
  
  <h2>For <code>window.map</code></h2>
  
  <pre><code>var marker = new google.maps.Marker({
                      position: myLatlng,
                      map: window.map,
                      icon: window.pins[keyword_category.category_name],
                      shadow: window.pins["Shadow"],
  
                      title:job.job_title
  });
  marker.job_type =  keyword_category.category_name;
  window.rightMarkers.push(marker);
  </code></pre>
  
  <h1>For <code>leftMap</code></h1>
  
  <pre><code>var marker = new google.maps.Marker({
                  position: myLatlng,
                  map: leftMap,
                  icon: window.pins[keyword_category.category_name],
                  shadow: window.pins["Shadow"],
  
                  title:job.job_title
   });
   window.leftMarkers.push(marker);
  </code></pre>
  
  <p>However in my detached DOM tree, when comparing before the maps were created / after they were destroyed, remains the google maps tiles:</p>
  
  <p><img src="https://i.stack.imgur.com/q2Kid.jpg" alt="enter image description here">  </p>
  
  <p>(Right click - open image to see full size)</p>
  
  <p>What can I do to find out what's causing this DOM leak?</p>