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

is Map::clear() supposed to do drop()? #102

Closed
yegor256 opened this issue Apr 30, 2023 · 2 comments
Closed

is Map::clear() supposed to do drop()? #102

yegor256 opened this issue Apr 30, 2023 · 2 comments

Comments

@yegor256
Copy link
Owner

At the moment, we don't drop() the keys/values. Maybe we should when we clear the map?

@alexkazik
Copy link
Contributor

Definitley.

If the clears_it_up test is changed to String (instead of str) then miri tells you:

error: memory leaked: alloc47704 (Rust heap, size: 3, align: 1), allocated here:

@yegor256
Copy link
Owner Author

@alexkazik maybe you can contribute with a pull request?

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

No branches or pull requests

2 participants