Are NIF resources meant to be destroyed immediately on GC?

Sean Hinde sean.hinde@REDACTED
Wed Nov 25 19:32:22 CET 2020

> On 25 Nov 2020, at 17:28, Max Lapshin <max.lapshin@REDACTED> wrote:
>> found a way to leave a socket connection open once it had "gone out of scope".
> 100% it was a bug of their benchmark.
> Reason was very simple: this C++ programmer just wanted job security.

Oh yeah! Mission accomplished. I think he just opened a socket, didn't store the socket ref in the process state, but kept the process alive. His conclusion was that the Erlang GC leaks sockets.

More information about the erlang-questions mailing list