[zeromq-dev] Java bindings error?

Joe Holloway jholloway7 at gmail.com
Thu Jun 24 00:56:48 CEST 2010

On Wed, Jun 23, 2010 at 5:50 PM, Joe Holloway <jholloway7 at gmail.com> wrote:
> JNI provides a way for the native code to acquire a "phantom
> reference" [1] to help in this situation (never used it, but I assume
> this is what it's for). The JNI Socket::construct(...) method could
> acquire a reference to the Context object to essentially force their
> lifespans to be the same.  Or, I recall seeing some reference counting
> internal to 0MQ that could maybe be put to use to make sure the native
> context object isn't destroyed until all of it's sockets are
> destroyed.

Ignore the bit about "phantom reference", I think I got a bit loopy
when reading the doc.  You'd probably just want the Socket to hold a
strong reference to its Context.

More information about the zeromq-dev mailing list