Mastering C++: A Comprehensive Quiz Based on 'Thinking in C++

Session length

1 / 20

Why is delete void* considered a bug?

It immediately crashes the program

It causes a memory leak

The reason why delete void* is considered a bug is because it causes a memory leak. This option is incorrect because it immediately crashes the program, causing it to be identified as a bug. Another incorrect option is C because it deletes all objects instead of just one, which can also cause program errors. Option D is also incorrect because it is not related to the question at hand and is not a reason why delete void* is considered a bug.

Get further explanation with Examzify DeepDiveBeta

It deletes all objects instead of one

It's more efficient to use custom deleters

Next Question
Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy