Antwort: [AGENT++] SNMP++/Agent++ on Windows (VC++) and the new operator

Jens Engel Jens.Engel at marconi.com
Fri Feb 25 11:54:36 CET 2005


Hello Marek,

> I would like to warn SNMP++ and Agent++ Windows users who build
applications with Visual C++ as it seems that by
> default, the new operator throws an std::bad_alloc exception (new C++
standard compliant approach) rather than
> returning null (the old-good (?) C++) when the heap is exhausted.

That described behaviour is Standard C++ (throwing std::bad_alloc instead
of returning NULL).
Therefore, you can expect it on any standard conforming C++ compiler,
including GNU gcc/g++.

Sincerely,
Jens Engel

mailto:Jens.Engel at marconi.com







More information about the AGENTPP mailing list