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] |