mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-27 11:06:52 +01:00
Problem: throwing version of new called
Solution: Pass (std::nothrow) as done in all other places.
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include "atomic_counter.hpp"
|
||||
#include "atomic_ptr.hpp"
|
||||
#include <assert.h>
|
||||
#include <new>
|
||||
#include <stdint.h>
|
||||
|
||||
#if !defined ZMQ_HAVE_WINDOWS
|
||||
@@ -75,7 +76,7 @@ unsigned long zmq_stopwatch_stop (void *watch_)
|
||||
|
||||
void *zmq_threadstart(zmq_thread_fn* func, void* arg)
|
||||
{
|
||||
zmq::thread_t* thread = new zmq::thread_t;
|
||||
zmq::thread_t* thread = new (std::nothrow) zmq::thread_t;
|
||||
thread->start(func, arg);
|
||||
return thread;
|
||||
}
|
||||
@@ -265,7 +266,7 @@ int zmq_curve_public (char *z85_public_key, const char *z85_secret_key)
|
||||
|
||||
void *zmq_atomic_counter_new (void)
|
||||
{
|
||||
zmq::atomic_counter_t *counter = new zmq::atomic_counter_t;
|
||||
zmq::atomic_counter_t *counter = new (std::nothrow) zmq::atomic_counter_t;
|
||||
alloc_assert (counter);
|
||||
return counter;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user