Some points about overriding new, regular and placement.
Four items need attention: ctor, dtor, and operator new, delete. see CNew
Regula
caller’s new calls “operator new” and ctor, similarly dtor.
new[] takes only one param as non-array version; the iSize already taken into consideration of array elememt number.
Placement:
also need delete(p, pLoc) so that placement can be handled.
caller delete like this: CNew::operator delete(a3, aPool);
for placement, do not just call delete since it does not know if memory is from application or OS
make sure dtor called for placement.
Download: http://riowing.net/p/wp/other.cpp
Private: scpp ra s “S:\Rio\proj\wordpress\algo\other.cpp” /mnt/ebs/rio/html/riosite/p/wp