[zeromq-dev] proper way to destroy/free zyre resources?

Wynne Adam (CR/RTC3.1-NA) Adam.Wynne at us.bosch.com
Wed Sep 16 15:51:10 CEST 2015


I can't see how to properly destroy/free resources in my hand-coded JNI wrapper.  I have a JNI destroy method that calls zyre_stop and zyre_destroy:  https://github.com/zeromq/zyre/blob/master/bindings/java/zyre-jni/src/main/c/org_zyre_Zyre.c#L30

The problem is that calling this method produces the error:

src/zactor.c:161: zactor_destroy: Assertion `zactor_is (self)' failed.

If I remove the zyre_destroy call, I get the errors:

E: 15-09-16 09:49:31 dangling 'PAIR' socket created at src/zsys.c:379
E: 15-09-16 09:49:31 dangling 'PAIR' socket created at src/zsys.c:380
E: 15-09-16 09:49:31 dangling 'PAIR' socket created at src/zsys.c:379
E: 15-09-16 09:49:31 dangling 'PAIR' socket created at src/zsys.c:380
E: 15-09-16 09:49:31 dangling 'ROUTER' socket created at src/zyre_node.c:83
E: 15-09-16 09:49:31 dangling 'PAIR' socket created at src/zsys.c:379
E: 15-09-16 09:49:31 dangling 'PAIR' socket created at src/zsys.c:380
E: 15-09-16 09:49:31 dangling 'PAIR' socket created at src/zsys.c:379
E: 15-09-16 09:49:31 dangling 'PAIR' socket created at src/zsys.c:380
E: 15-09-16 09:49:31 dangling 'ROUTER' socket created at src/zyre_node.c:83
E: 15-09-16 09:49:31 dangling 'DEALER' socket created at src/zyre_peer.c:115
E: 15-09-16 09:49:31 dangling sockets: cannot terminate ZMQ safely

Any ideas on what I am missing?

Thanks
Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20150916/972b568e/attachment.htm>


More information about the zeromq-dev mailing list