I've been running into a number of problems of a horribly annoying form. The general story looks like this:
--I run the program (developing on MSVC 2010, using CRT for memory leak checking)
--Oh noes! A memory leak!
--Nothing is obvious. Removing files/recompiling eventually tracks it down to one line in a particular file. When this line is commented, no leak. Uncommented, leak.
--But this line is never ever called. Ever. Using a debugger and putting it right before, it's obvious that it isn't.
How can a line that is never called cause a memory leak? I've made some silly conjectures, but really I don't know the answer.
Code should not be terribly relevant, but FWIW, the line that's causing the issue this time is:
menu = new QMenu();
QMenu comes from Qt 4.8.4. I've had problems with Bullet Physics though too.
What could be causing this? Thanks,