I've recently started using the 4.2 compiler (with the vc42b.exe patch) only a large project that previously worked fine when built with the 4.1 compiler. Now, when built with the 4.2 compiler, the debug version of my program triggers an ASSERT in dbgheap in the _free_dbg function on line 1051. The code is:
/* Error if freeing incorrect memory type */
_ASSERTE(pHead->nBlockUse == nBlockUse);
Does anyone know what's causing this and how to fix it. The program seems to run fine if I just ignore the ASSERT.