From 8aa0908635f255e2d533539d5330b92b62dc88ba Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Tue, 15 Dec 2009 23:49:55 +0100 Subject: all news converted to nothrow variant --- src/dispatcher.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/dispatcher.cpp') diff --git a/src/dispatcher.cpp b/src/dispatcher.cpp index 51143b3..7115bca 100644 --- a/src/dispatcher.cpp +++ b/src/dispatcher.cpp @@ -17,6 +17,8 @@ along with this program. If not, see . */ +#include + #include "../bindings/c/zmq.h" #include "dispatcher.hpp" @@ -49,7 +51,8 @@ zmq::dispatcher_t::dispatcher_t (int app_threads_, int io_threads_, // Create application thread proxies. for (int i = 0; i != app_threads_; i++) { - app_thread_t *app_thread = new app_thread_t (this, i, flags_); + app_thread_t *app_thread = new (std::nothrow) app_thread_t (this, i, + flags_); zmq_assert (app_thread); app_threads.push_back (app_thread); signalers.push_back (app_thread->get_signaler ()); @@ -57,15 +60,16 @@ zmq::dispatcher_t::dispatcher_t (int app_threads_, int io_threads_, // Create I/O thread objects. for (int i = 0; i != io_threads_; i++) { - io_thread_t *io_thread = new io_thread_t (this, i + app_threads_, - flags_); + io_thread_t *io_thread = new (std::nothrow) io_thread_t (this, + i + app_threads_, flags_); zmq_assert (io_thread); io_threads.push_back (io_thread); signalers.push_back (io_thread->get_signaler ()); } // Create command pipe matrix. - command_pipes = new command_pipe_t [signalers.size () * signalers.size ()]; + command_pipes = new (std::nothrow) command_pipe_t [signalers.size () * + signalers.size ()]; zmq_assert (command_pipes); // Launch I/O threads. -- cgit v1.2.3