Re: Debug vs Release...Some questions...Please Help...
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Wed, 21 Dec 2005 10:14:55 -0500
See below...
On 20 Dec 2005 14:15:03 -0800, "Solomon_Man" <solomon_man@xxxxxxxxx> wrote:
>Hi All,
>Thanks for all the previous help thus far on my little project!
>
>This may be a basic question but can someone describe the differences
>between a Debug build and Release build.
>
> 1) Which build does all variables get initialized?
****
Abstractly, in neither build. The difference is that in the debug build, local variables
and heap variables are initiized to nonsense values that usually cause well-defined access
faults or give really bogus numeric values. If you have explicit initialization clauses,
e.g.,
int x = 4;
on a local variable, then x will be initialized to 4 in either build.
***
> 2) Why does a release build execute fine but the debug version bring
>up assertions,exceptions, etc?
****
Because your program is buggy. The release build merely ignores the errors that are
already in your program, that's why we have all those ASSERTs coming up: they say "your
program is wrong here. Fix it". In the release build, the errors may not show up, but
they still exist. Perhaps they are innocuous. Perhaps not. But they are errors, so you
have to fix them.
****
>
>The reason I am asking this question is I have application (exe) that
>runs fine in Release mode but the Debug versions cause different
>exceptions and asssertions to occur and I am trying to figure out why
>they are occuring and if in certain circumstances if this is OK?
***
Because ;your program is wrong. The apparent successful execution in release mode is an
illusion.
***
>
>Please Help.
>
>Thanks,
>Chris
>SolomonMan
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- References:
- Debug vs Release...Some questions...Please Help...
- From: Solomon_Man
- Debug vs Release...Some questions...Please Help...
- Prev by Date: Re: Newbie looking for training class and good books.....
- Next by Date: Re: Newbie looking for training class and good books.....
- Previous by thread: Re: Debug vs Release...Some questions...Please Help...
- Next by thread: Re: Debug vs Release...Some questions...Please Help...
- Index(es):
Relevant Pages
|