RE: C++ pushback

David Schwartz
2006-04-30T20:55:28Z

> The C++ standard does not allow an allocator to return NULL, it is
> supposed to raise an exception.
>
> Jan

It is not that unusual for C++ projects to use no exceptions at all. They
simply replace the default standardized allocators with their own. These
allocators can do whatever you want when memory runs out, including waiting
until more memory is available while acting to reduce memory usage in other
parts of the program.

You are not forced to use exceptions if you don't want to. Personally, I
don't like them, and I rarely use them, even in large C++ projects (hundreds
of thousands of lines).

DS