2014-04-02 19:10 GMT+13:00 Pritesh Acharya <[email protected]>:
> Hi, > zmq version: zeromq-4.0.3(build as Windows DLL) > czmq version: czmq-2.0.3(build as Windows DLL) > IDE: Visual Studio Professional 2010 > > I have a small progream which creates two thread and uses ZMQ_PAIR socket > over inproc to send data from one to another. > One thread sends data using zstr_send and other receives using zstr_recv. > If I don't free string received from zstr_recv , I get constant increase > of memory (via Task Manager). > If I free it using free(), i get heap corruption error on the frist free. > > You should use zstr_free() instead of free() to free the string returned from zstr_recv(). It's documented in current czmq trunk, not sure why it is missing from http://czmq.zeromq.org/manual:zstr // Free a provided string, and nullify the parent pointer. Safe to call on // a null pointer. CZMQ_EXPORT void zstr_free (char **string_p); Kind regards, Ivan
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
