[zeromq-dev] JeroMQ resources deallocation

Trevor Bernard trevor.bernard at gmail.com
Mon Nov 24 18:45:49 CET 2014

Hi Frederic,

Thanks for taking the time to write this post.

> 1) a very recent commit (related to issue #200) in Ctx.destroySocket()
> removed the call to Socket.close(). As far as I can see, this inhibits
> closing the sockets in the cycle: ZContext.createSocket()  <do your work>
> ZContext.destroySocket() ZContext.close(), leading to a "Too Many Opened
> Files" exception quite fast.

A simple test case that exhibits this bug would be extremely helpful.

> 2) the second leak is related to the zmq package, while using one of the
> ZMQ.poll() method.
> The closing of the Selector is done in one finalize method, which is not a
> guarantee of calling and adds penalty performance on creation and
> destruction.

Yeah, I looked into the code the use of finalize seems awkward. If you
have a patch, please send a pull request.


More information about the zeromq-dev mailing list