[zeromq-dev] Memory leak issue with PUB/SUB & XREQ/XREP socket in multi-thread environment

yy l liyongyan0523 at gmail.com
Mon Jul 18 08:24:10 CEST 2011

Hello everyone!

Attachment is my test code, include project files but not include libzmq.dll
and libzmq.lib! My machine is Intel X86. My IDE is visual studio2010. My zmq
is 2.1.7.

First, I start the server, then start the client. Server has a main thread,
a work thread and a pub thread. Client has a main thread and sub thread.
Server is listening client's connect request and pub some messages. Client
is creating zmq_context, creating REQ and SUB socket, connecting  server,
creating sub thread to recv pub data, and informing sub thread to exit,
closing sockets, terminating zmq_context.
Through Windows Task Manager, we can see the server's memory used is

So, what's the problem? Did I use zmq correctly?

Hope someone help me!

Thank you with good wishes!!!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110718/024939a4/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_vc10-20110718.rar
Type: application/rar
Size: 16138 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110718/024939a4/attachment.rar>

More information about the zeromq-dev mailing list