Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix memory leak in Worker when map is removed (#3733) #3734

Merged
merged 4 commits into from
Feb 27, 2024

Conversation

pasieronen
Copy link
Contributor

@pasieronen pasieronen commented Feb 22, 2024

Fixes #3733

  • Confirm your changes do not include backports from Mapbox projects (unless with compliant license) - if you are not sure about this, please ask!
  • Briefly describe the changes in this PR.
  • Link to related issues.
  • Include before/after visuals or gifs if this PR includes visual changes.
  • Write tests for all new functionality.
  • Document any changes to public APIs.
  • Post benchmark scores.
  • Add an entry to CHANGELOG.md under the ## main section.

@HarelM
Copy link
Collaborator

HarelM commented Feb 22, 2024

Thanks for taking the time to open this PR!
Jest tests are using a message bus implementation that simply doesn't use a worker but uses the same "thread".
Also there's a template for the PR which helps making sure everything is added like changelog (which is missing, mapbox packporting) etc.
There are some tests that check all kind of dispatched messages etc I would recommend looking at those.
Bottom line, this needs tests.

src/ui/map.test.ts Outdated Show resolved Hide resolved
@HarelM
Copy link
Collaborator

HarelM commented Feb 26, 2024

Besides the above nit picking, this looks good, thanks!
Once changelog conflicts are resolved, I'll merge this.

@HarelM HarelM merged commit 2095380 into maplibre:main Feb 27, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

map.remove() doesn’t clean up data inside Worker class -> memory leak
2 participants