summaryrefslogtreecommitdiff
path: root/src/socket_base.hpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-02-25 08:58:01 +0100
committerMartin Sustrik <sustrik@250bpm.com>2011-02-25 08:58:01 +0100
commitd4e418f5f48a4d73e0a80a54593d11a6cd86d7bc (patch)
treed4d7de60c008739d2bf5d772b216bda4c856bea2 /src/socket_base.hpp
parentc22e52737a5f12f0edfe3f669fa2bfd6e372dec7 (diff)
Socket with no owner objects is deallocated immediately
Till now the deallocation of such socket was delayed till zmq_term() thus creating a "leak". Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/socket_base.hpp')
-rw-r--r--src/socket_base.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/socket_base.hpp b/src/socket_base.hpp
index cea5bc8..8b2eab8 100644
--- a/src/socket_base.hpp
+++ b/src/socket_base.hpp
@@ -97,6 +97,10 @@ namespace zmq
void out_event ();
void timer_event (int id_);
+ // To be called after processing commands or invoking any command
+ // handlers explicitly. If required, it will deallocate the socket.
+ void check_destroy ();
+
protected:
socket_base_t (class ctx_t *parent_, uint32_t tid_);