Ber79AtPixelario / google-maps-utility-library-v3

Automatically exported from code.google.com/p/google-maps-utility-library-v3
Apache License 2.0
0 stars 0 forks source link

Memory Leak in MarkerClustererPlus When Removing and Adding Clusters Repeatedly #265

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Demo link or sample code:
http://relaysupply.com/markerclustererplus/examples/simple_example_mem_leak.html
What steps will reproduce the problem?
1. Just view the page.  There are about 20 clusters.  Each cluster gets 
setMap(null) called on them, and then setMap(map) every 2 seconds using 
setTimeout.
2. The bounds_changed event listener is attached to the map rather than the div 
of the cluster.  As a result, it is never cleared by the onRemove function.

Expected result:
Memory should not leak within 5 minutes.

Actual result:
20 mb's leaked in 2 minutes.

Version: Trunk

Browser / Operating System:
Chrome 28 / Windows 7

Additional comments:
Attached screen shots of heap dumps in chrome dev tools with a timer to show 
how fast the memory leak can accumulate within 2 minutes of 20 clusters being 
swapped every 2 seconds.

*********************************************************
Tip: Star this issue (next to title) to receive notifications of status
changes against this issue, also used as a gauge for how many people are
interested in seeing it resolved.
*********************************************************

Original issue reported on code.google.com by brett.mc...@gmail.com on 15 Jul 2013 at 7:07

Attachments:

GoogleCodeExporter commented 8 years ago
Fixed by adding a reference to the bounds_changed event listener so that it can 
be removed in the onRemove function.  Demo here:

http://relaysupply.com/markerclustererplus/examples/simple_example_mem_leak_patc
hed.html

Original comment by brett.mc...@gmail.com on 15 Jul 2013 at 8:21

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by brett.mc...@gmail.com on 12 Sep 2013 at 7:41

GoogleCodeExporter commented 8 years ago
Issue 286 has been merged into this issue.

Original comment by brett.mc...@gmail.com on 20 Feb 2014 at 1:57