From Borland help file
Syntax:
<::> new <new-args> type-name <(initializer)>
<::> new <new-args> (type-name) <(initializer)>
Description
The new operator offer dynamic storage allocation, similar but superior to the standard library function malloc. The new operator must always be supplied with a data type in place of type-name. Items surrounded by angle brackets are optional. The optional arguments can be as follows:
:: operator, invokes the global version of new.
new-args can be used to supply additional arguments to new. You can use this syntax only if you have have an overloaded version of new that matches the optional arguments.
initializer, if present is used to initialize the allocation.
A request for non-array allocation uses the appropriate operator new() function. Any request for array allocation will call the appropriate operator new[]() function. Selection of operator is done as follows:
By default, operator new[]() calls operator new()
If a class Type has an overloaded version of operator new[](), arrays of Type will be allocated using Type::operator new[]()
If a class Type has an overloaded version of new, and no overloaded version of the array allocator operator new[](), arrays of Type will be allocated using Type::operator new()
Memory for a non-array object of Type is allocated using Type::operator new()
If none of the above cases apply, the global ::operator new() is used
Note: Arrays of classes require the default constructor.
new tries to create an object of type Type by allocating (if possible) sizeof(Type) bytes in free store (also called the heap). new calculates the size of Type without the need for an explicit sizeof operator. Further, the pointer returned is of the correct type, "pointer to Type," without the need for explicit casting. The storage duration of the new object is from the point of creation until the operator delete destroys it by deallocating its memory, or until the end of the program.
If successful, new returns a pointer to the new object. By default, an allocation failure (such as insufficient or fragmented heap memory) results in the predefined exception xalloc being thrown. Your program should always be prepared to catch the xalloc exception before trying to access the new object (unless you use a new-handler).
A request for allocation of 0 bytes returns a non-null pointer. Repeated requests for zero-size allocations return distinct, non-null pointers.
Handling Errors for the new Operator
You can define a function to be called if the new operator fails. To tell the new operator about the new-handler function, use set_new_handler and supply a pointer to the new-handler. If you want new to return null on failure, you must use set_new_handler(0).