-
Notifications
You must be signed in to change notification settings - Fork 49
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
Vector删除操作可能会内存泄露 #117
Comments
是的
…On Sun, Jun 25, 2023, 15:28 goldpasser ***@***.***> wrote:
golang/go#54650 <golang/go#54650>
https://natan36.medium.com/gos-memory-leak-caused-by-slice-742d668bcfa6
如果Vector存放的是指针,删除有可能内存泄露。
—
Reply to this email directly, view it on GitHub
<#117>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAPH4SWZONR3JK3UIKTWBV3XM7SDTANCNFSM6AAAAAAZS7L4ZY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
有什么好的方案吗? |
Pop和Remove确实会,我改为用零值填充 |
好像也只能这样了 |
chen3feng
added a commit
that referenced
this issue
Aug 17, 2023
* Fix memory leak when clean or remove from vector, close #117
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
golang/go#54650
https://natan36.medium.com/gos-memory-leak-caused-by-slice-742d668bcfa6
如果Vector存放的是指针,删除有可能内存泄露。
The text was updated successfully, but these errors were encountered: