TITLE: using placement new and delete operators (Newsgroups: comp.lang.c++.moderated, 10 Sep 1997) RONEN: Dudu Ronen > When overriding the global operator new, it is possible to supply an extra > parameter, which would be the appropriate memory manager. However, it is > not possible to supply an extra parameter to the global delete operator. MARTIN: "Robert C. Martin" Your compiler is not up to date then. Newer versions of the compiler will allow you to put "placement" syntax into operator delete. However, placement delete will only be called when a constructor invoked by the conjugal operator new throws an exception. Normally, if you want placement operator delete called, you have to call it yourself like so: O* o = new(myHeap) O; // placement new. // use o o->~O(); // invoke destructor upon the object. operator delete(o, myHeap); If your compiler truly won't let you create placement versions of operator delete, then be very careful when throwing an exception from a constructor. The wrong operator delete is likely to be called! If exceptions are not a problem, then you can create a template function that might help. template void MyDelete(T* o) { o->~T(); // invoke destructor DeleteFromMyHeap(o); } This allows you to say: O* o = new(myHeap) O; // use o; MyDelete(o); If your compiler supports dynamic_cast, you are actually better off with: template void MyDelete(T* o) { o->~T(); // invoke destructor void* v = dynamic_cast(o); DeleteFromMyHeap(v); } The dynamic_cast will calculate the address at the beginning of the actual object. This can be helpful in cases where 'o' does not point to the address that was returned by operator new(...). This can happen in cases of Multiple Inheritance....