Deleting forward declared pointers leads to undefined behavior.
Examples:
However, my Visual Studio (VS2012) compiler doesn't warn me about it.
- Is this an unfixed VS2012 compiler bug?
- Did I disable (or never enable) the corresponding warning?
- Is this specific to some project setting?
- Visual Leak Detector hinted me to the problem, but is there some method (pragma, code, macro, ...) to detect this at compile time?