[zeromq-dev] Event zmq-signaler-port-sync leaking
Pieter Hintjens
ph at imatix.com
Sat Dec 22 12:14:29 CET 2012
When I run the same code in C, with valgrind, I don't see any memory
leaks. Does the C++ runtime not use the heap?
#include <czmq.h>
int main (void)
{
zctx_t *ctx = zctx_new ();
int i;
for (i = 0; i < 1000; ++i) {
void *front = zsocket_new (ctx, ZMQ_PAIR);
void *back = zsocket_new (ctx, ZMQ_PAIR);
zsocket_bind (front, "inproc://test%d", i);
zsocket_connect (back, "inproc://test%d", i);
}
zctx_destroy (&ctx);
return 0;
}
-Pieter
On Thu, Dec 20, 2012 at 1:50 PM, Felipe Farinon
<felipe.farinon at powersyslab.com> wrote:
> I'm using version 3.2.2 of ZeroMQ, running on a Windows 7, compiled with
> a MSVC 10.
>
> The following piece of code reproduces the problem:
> http://pastebin.com/6p2sLaEM
>
> It seems that if we create lots of PAIR sockets in Windows, we get an
> event leak. The event leak is shown by this image, taken at the end of
> the loop execution:
> https://dl.dropbox.com/u/2612634/leak.png
>
> The error is in signaler.cpp method zmq::signaler_t::make_fdpair, which
> creates the events but never releases them.
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
More information about the zeromq-dev
mailing list