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

[pdata] Prevent RemoveIf memory leak by erasing truncated values in slices #8976

Open
mx-psi opened this issue Nov 21, 2023 · 0 comments
Open
Labels
area:pdata pdata module related issues enhancement New feature or request

Comments

@mx-psi
Copy link
Member

mx-psi commented Nov 21, 2023

In the RemoveIf methods we can erase truncated values in slices explicitly to prevent a memory leak. This issue is meant to track the prior TODO on the code originally added in #2998:

// TODO: Prevent memory leak by erasing truncated values.
*es.orig = (*es.orig)[:newLen]

@mx-psi mx-psi added enhancement New feature or request area:pdata pdata module related issues labels Nov 21, 2023
mx-psi added a commit that referenced this issue Nov 21, 2023
**Description:** 

Removes `TODO` from code in favor of having this on the issue tracker as
we do for most issues.

**Link to tracking Issue:** This is now tracked by issue #8976
pantuza pushed a commit to pantuza/opentelemetry-collector that referenced this issue Dec 8, 2023
**Description:** 

Removes `TODO` from code in favor of having this on the issue tracker as
we do for most issues.

**Link to tracking Issue:** This is now tracked by issue open-telemetry#8976
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:pdata pdata module related issues enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant