Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
After filtering without allocating, it's recommended to loop over the underlying slice `a` and setting all unneeded values to `nil` manually if they're to be gc'ed. Instead, one might simply use the builtin `clear` on the sub-slice starting at the end of `b`. Change-Id: I25c180bbbccf989ffa0d1fadd54e3a20ff9504c8 GitHub-Last-Rev: ce32262 GitHub-Pull-Request: #24 Reviewed-on: https://go-review.googlesource.com/c/wiki/+/609517 Auto-Submit: Ian Lance Taylor <[email protected]> Commit-Queue: Ian Lance Taylor <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
- Loading branch information