   [MSVC]: Automatic variable initialization in debug builds. How does one disable it?
  My release builds exhibit bugs that do not show up in debug builds. This is driving me nuts.I've been trying to play around with RTC1 and related options but none of them seem to be related to this 'feature'. Is there a way to turn this off, perhaps via pragmas?   
  If you're referring to stack variables being initialized with predetermined values, that's controlled by /RTCs. If you're referring to heap memory being initialized with predetermined values, that's controlled by which version of the CRT you link against.   ;  You can also run the debugger on the release build. This is necessary sometimes when a bug only manifests itself in the presence of optimizations. Take a release build, turn on debug info, and viola. Debuggable release build.   ;  One thing worth noting here is that Windows itself will initialize heap memory for you if a debugger is connected at application startup.The easiest way around this is to start the program without debugging, and then attach the debugger to the running process.   ;Quote:Original post by SymLinkedMy release builds exhibit bugs that do not show up in debug builds. This is driving me nuts.Be aware that there are far more potential reasons for this than just the variable initialization thing. :)   ;  Not to be douche-y, but why don't you just initialize your variables?   