Kiran's Blog

Ramblings from a dehydrated mind…

  • Archives

    • 14,907
  • Advertisements

Works in debug..but not in release

Posted by kiraninbng on June 29, 2006

So Why does my program run in debug but not in release ? Well it could be for any of the following reasons

1.Variables are initalized in debug build but not in release
    Soln : Initialize every variable before using them in the code.
2. Assert statements are ignored in the release build
    Soln : Use verify instead of assert,verify behaves like assert in debug build and in release it will just execute the condition in the verify.Better explicitly handle the error conditions,it is good to not to rely on verify.

3. Give complete and correct declarations in the message map entries(basically avoid copy/paste,use class wizard).It can hurt real bad in the release version.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: