Closed carrieedwards closed 2 years ago
r := *a
results[i] = &r
No modify origin is this case. Color is a string
Main reson for use CopyTags
and avoid dereference a
- copy to heap allocated again in original code - better performance.
CopyTags do no-deep (linked) copy in one step.
Several functions were still modifying the original series input, instead of making a copy before processing the data. This can lead to no-copy-on write bugs. This PR updates the remaining functions that were using
r := *a
, instead usingr := a.CopyLinkTags()
.