News for hackers. Stuff that matters.
Re:C++ on Embedded Systems by gpderetta on Tuesday February 21, 2017 @08:55AM (#13695397)
that's kind of circular... having a virtual destructor is useful only if you actually are going to call delete. If you want to make sure that the object is never heap allocated, just declare the operator new as deleted and at least the issue would be always caught at compile time instead of just having a chance of catching it a runtime.
Re:C++ on Embedded Systems by lultimouomo on Tuesday February 21, 2017 @05:14PM (#13700565)
I agree, that was the sense of my original comment. Actually, most probably you don't even need to delete it as it's not defined with -ffreestanding