0
0
mirror of https://github.com/zeromq/libzmq.git synced 2025-01-01 10:50:28 +08:00

issue 33 - missing virtual destructors

This commit is contained in:
Martin Sustrik 2010-06-10 07:21:05 +02:00
parent d329c55da9
commit 76e0153d4f
4 changed files with 14 additions and 2 deletions

View File

@ -55,7 +55,9 @@ namespace zmq
zmq_assert (buf);
}
inline ~decoder_t ()
// The destructor doesn't have to be virtual. It is mad virtual
// just to keep ICC and code checking tools from complaining.
inline virtual ~decoder_t ()
{
free (buf);
}

View File

@ -50,6 +50,8 @@ namespace zmq
zmq_assert (buf);
}
// The destructor doesn't have to be virtual. It is mad virtual
// just to keep ICC and code checking tools from complaining.
inline ~encoder_t ()
{
free (buf);

View File

@ -35,7 +35,9 @@ namespace zmq
{
}
inline ~yarray_item_t ()
// The destructor doesn't have to be virtual. It is mad virtual
// just to keep ICC and code checking tools from complaining.
inline virtual ~yarray_item_t ()
{
}

View File

@ -50,6 +50,12 @@ namespace zmq
c.set (&queue.back ());
}
// The destructor doesn't have to be virtual. It is mad virtual
// just to keep ICC and code checking tools from complaining.
inline virtual ~ypipe_t ()
{
}
// Following function (write) deliberately copies uninitialised data
// when used with zmq_msg. Initialising the VSM body for
// non-VSM messages won't be good for performance.