So I've been programming for quite a while and I swear to God when you create an array on the heap.
You must, to avoid a memory leak, call:Code:float *f = new float;
However, if I watch the actual memory the code below appears to clean up all memory just fine does it not?Code:delete  f;
I was taught this would only delete the pointer and not the entire array, but now that I think about it isn't f's allocation size of 20 bytes just stored in the heap table and when a delete is called it just pulls that # of 20 off the heap table and deletes it?Code:delete f;
First call is just calling malloc(20) and the second is just freeing that 20 bytes no matter which delete call is made? eh? Am I wrong here? What is the difference between delete  and delete again?
(If anyone is wondering I'm overriding the new and delete calls to write my own at which point I encountered this seemingly basic issue)