O'Reilly logo

Navigating C++ and Object-Oriented Design by Gail Anderson, Paul Anderson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

8.1. Global new and delete

The global versions of operator new and operator delete in the standard C++ library provide a uniform interface for allocating and deallocating objects of any type (built-in or class type). Table 8.1 shows the calling formats and signatures for global new.

Table 8.1. Formats for global new
Call Format Signatures
new Type (predeclared) void *operator new(size_t) throw(bad_alloc);
new(nothrow) Type void *operator new(size_t, const nothrow_t &) throw();
new (loc) Type void *operator new(size_t, void *) throw();
new Type[size1][sizeN] (predeclared) void *operator new[](size_t) throw(bad_alloc);
new(nothrow) Type[size1][sizeN] void *operator new[](size_t, const nothrow_t &) throw();
new (loc) Type[size1][sizeN] void *operator ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required