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

Question: Does swissmap shrink on key deletion? #38

Closed
Jakobovski opened this issue Oct 22, 2024 · 1 comment
Closed

Question: Does swissmap shrink on key deletion? #38

Jakobovski opened this issue Oct 22, 2024 · 1 comment

Comments

@Jakobovski
Copy link

Does swissmap suffer from the same key-deletion issue as golang map? Namely memory is not freed upon deleting of keys?

See golang/go#20135

@Jakobovski Jakobovski changed the title Question: Does swissmap shrink on key deletion? #37 Question: Does swissmap shrink on key deletion? Oct 22, 2024
@petermattis
Copy link
Contributor

swiss.Map has similar delete behavior to Go's builtin map. The Map grows during insertion, but does not shrink during deletion. However, deleted pointer values can be Gc'd. So can the memory associated with string keys.

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