Skip to main content


Showing posts from February, 2021

C++ Is It Safe to Delete a void Pointer?

According to C++ Standard deleting a void* (void pointer) is undefined behavior. However usually the program will compile and run without any errors. Also the memory pointed by the pointer will be cleared. But deleting a void pointer will not call destructors.