Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

difference between release and debug mode

Status
Not open for further replies.

dima2

Programmer
Jan 20, 2002
85
LB
hi,
can anyone explain to me the difference between the release and the debug mode in visual c++ projects.

thanks.
 
Debug - mode Program:
1. uses some DLLs from Visual Studio and can't work on Computers, they do not have VC installed.
2. is more slow as release (not optimized).
3. there are some differences in usage on CDC in Windows.
4.A Debug - Program uses more memory (debugger adds some bytes after each Variable, and some Programs by errors in addressing can run as debug and crash as release).
5. And You can't debug a release - Program. Release is for users, debug - for You only.
 
PLUS: All the asserts embedded in your code will work IF AND ONLY IF the program is in the debug mode. ASSERTS are macros that test for the _DEBUG directive defined only in the debug mode.
Don't be surprised if the release code just crashes, especially if you used ASSERTS instead of IF's. That's something one never should do. [red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
once stated: methane@personal.ro
 
One other difference that caught me is that the debug version will initialize memory when it is allocated to 0xcdcdcdcd while in release mode memory is not initialized. In cases where you allocate and free memory repeatedly you might get memory which was used before that could have unexpected effects on your program execution.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top