On Sep 23, 12:48 pm, Xianzheng Zhou <j...@lgsolutions.com.auwrote:
I heard new/delete operations could be overwritten with
customed functions.
I presume you mean "overridden", not "overwritten".
Just wonderring how this could be achieved.
In a very real way, it depends on the implementation, but for
all of the implementations I know, if you define an operator new
and an operator delete function, and arrange for them to be
linked in before the standard library is linked in, then your
versions will be used instead of the standard ones.
Note that you should never do this except at the final
application level (e.g. to use a debugging new/delete, instead
of the standard one).
--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34