views:

234

answers:

0

Hey, I have a Project that runs fine in Debug Mode. But in Release Mode it crashs with every malloc();

Even

Winmainetc(){ char* szTest; szTest = (char*)malloc(1); } 

fails...

Under Debug Mode all works fine. The thing is that I selected Multitrheaded (/MT) in the linker, so it statically links the mscvr90.dll into the binary. If i change this to (/MTd) - still in Release mode, the release mode bin works, but it has all debug info in it (_DEBUG is defined and the bin is 180 instead of 70kb)...

Any suggestions why malloc doesn't work in release mode? Has something to do with /MT (Multithreaded).

Thanks.