I wrote the following heap debugger in order to demonstrate memory leaks, double deletes and wrong forms of deletes (i.e. trying to delete an array with delete p
delete p
void* raw = static_cast(payload) - ALIGNMENT;
If payload has been already deleted, wouldn't that make this undefined behavior?
payload