js-samples icon indicating copy to clipboard operation
js-samples copied to clipboard

Bug: memory leak on deleting marker

Open kd509 opened this issue 2 years ago • 1 comments

Operating system

Windows 10, 19045.2604

Browser Version

Chrome 110.0.5481.104

How severe is the bug?

high

Bug description

When trying to remove a marker from the map using setMap(null) and set the object and all known references to null, marker stays in memory.

Steps to reproduce

You can reproduce it with your own example: https://jsfiddle.net/gh/get/library/pure/googlemaps/js-samples/tree/master/dist/samples/marker-remove/jsfiddle

  1. open the url
  2. create a heap memory dump in developer tools
  3. search for "_.wh". There are four objects
  4. click on "delete markers" in jsfiddle
  5. click on garbage collector in developer tools
  6. create a new heap memory dump in developer tools
  7. search for "_.wh". There should be one less, but still four availble.

Console log output

No response

kd509 avatar Feb 22 '23 13:02 kd509

If you would like to upvote the priority of this issue, please comment below or react with :+1: so we can see what is popular when we triage.

@kd509 Thank you for opening this issue. 🙏 Please check out these other resources that might help you get to a resolution in the meantime:

This is an automated message, feel free to ignore.

wangela avatar Feb 22 '23 13:02 wangela