natefinch / npipe

A Windows named pipe implementation written in pure Go.
MIT License
297 stars 73 forks source link

Missing finalizer #8

Open alexpilotti opened 10 years ago

alexpilotti commented 10 years ago

When a PipeConn or PipeListener instance goes out of scope without having closed an underlying Win32 pipe handler, the pipe will remain open.

This can be solved by setting a finalizer: http://golang.org/pkg/runtime/#SetFinalizer