Commit b21f3137 authored by Russ Cox's avatar Russ Cox

os: drop File finalizer after normal Close

R=r
CC=golang-dev
https://golang.org/cl/586043
parent f4322a84
......@@ -97,6 +97,9 @@ func (file *File) Close() Error {
err = &PathError{"close", file.name, Errno(e)}
}
file.fd = -1 // so it can't be closed again
// no need for a finalizer anymore
runtime.SetFinalizer(file, nil)
return err
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment