KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I've read that the delete[] operator is needed because the runtime environment does not keep information about if the allocated block is an array of objects that require destructor calls or not, but it does actually keep information about where in memory is the allocated block stored, and also, of course, the size of the block. It would take just one more bit of meta data to remember if destructors need to be called on delete or not, so why not just do that? I'm pretty sure there's a good explanation, I'm not questioning it, I just wish to know it.
Tags (comma-separated)
Save Edits
Cancel