8000 Go Optimizations 101: 6-Map · Issue #256 · go101/go101 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

Go Optimizations 101: 6-Map #256

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

Closed
zeisss opened this issue May 24, 2023 · 1 comment
Closed

Go Optimizations 101: 6-Map #256

zeisss opened this issue May 24, 2023 · 1 comment

Comments

@zeisss
Copy link
zeisss commented May 24, 2023

Link: https://go101.org/optimizations/6-map.html

Under "Clear map entries" it gives the following example to release a map:

aMap = map(map[K]V)

I think this is intended to be aMap = make(map[K]V)?

@zigo101
Copy link
Collaborator
zigo101 commented May 27, 2023

@zeisss
Thanks for finding this silly bug!

BTW, since Go 1.21, there is a better way to do this job: golang/go#56351

@zigo101 zigo101 closed this as completed May 27, 2023
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
0