In my previous dicuss, we have seen the example of overloaded delete and new operator. and as a matter of fact, we have seen the following signature of the delete operator.
void operator delete(void *); void operator delete(void *, size_t size);
As you will soon find out that they both match the same new operator
void operator new (size_t);
but which one should we choose to use?
and even, you can define both the operator delete(void *) and the operator delete (void *, size_t) in the same class, and according to my test , in the placement operator overloading example, the "operator delete(void *)" has precedance over the "operator delete (void *, size_t)"....
so here is my rule of thme, we uses operator delete (void *, size_t size) when
And when to use the operator delete (void *)?