Yes, the memory will be continuous. As for the distribution, it matches the version of malloc
, but there are several differences (constructor calls, new
do not return NULL
, malloc
do not throw exceptions, etc.).
Note that you cannot mix new[]
with delete
or free
, you must use delete[] objects
to free memory.
source share