3 ms·
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 neve
by gpderetta 10y ago
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.
- lultimouomo 10y agoI 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