Recently, I was writing a custom memory allocator,See this article in detail custom memeory alloc..
thanks to the answer of David Hammen,now i can free the memory of polymorphic objects correctly. then seem i can use MYNEW macro to alloc memory and construct object, use MYDEL macro to destroy object and free memory,also can be memory tracking.
but I'm not sure whether it can be used in a complex project environment(eg:complex multiple inheritance design..), whether there are hidden dangers ?
NOTE: i am not ask for how to do memory manager, how to overload operator new/delete(global or for class), I just want to know whether there are problem of this method in the actual project development. Thanks for any answer.