Follow these rules:
Rule 1: Always regularly test both the Debug and Release mode versions of your applications.
Rule 2: Never classify a problem as a Debug -Vs- Release mode problem unless you've tried both versions on several different machines.
Rule 3: Be very cautious that you dont place code that must be executed in a place where it will be compiled out in release mode.
Rule 4: Never assume that your variables are initialized unless you've explicitly initialized them in your code. This includes global variables, automatic variables, malloced data, and newed data.
Rule 5: When you start a project turn the warning level to "Level 3" or "Level 4" and make sure your code compiles with no warnings before you check your code in.
Rule 6: Make sure all references to resources are removed when you delete them from your resource file. This includes references in resource.h.
http://www.codeguru.com/cpp/v-s/debug/article.php/c1259/
http://www.codeproject.com/KB/debug/survivereleasever.aspx
http://www.codeproject.com/KB/debug/releasemode.aspx