Closed leonklingele closed 5 years ago
Have you tried removing the reported lines? I think the tests will still pass, because since 1.11 (or earlier?) Go tracks object lifetimes more intelligently than it used to. It will free memory even before a variable referencing it goes out of scope if it sees that the variable is no longer used.
They still pass after removing the v = nil
assignment! Thanks for helping and sorry for the interruption :)
While scanning the Go source, this tool reports the following lines as an ineffectual assignment to v:
This is not the case as the code is testing runtime finalizers.
Full warnings:
and