Bug: memory leak on deleting marker

Đang mở
#1,419 1 bình luận 0 reaction 1 người được giao Xem trên GitHub

@wangela đang làm issue này rồi.

Từ ngày 22/2/2023.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
804
Fork
826
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của googlemaps/js-samples

Tất cả issue của googlemaps/js-samples

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.