Release and Debug

Source: Internet
Author: User
When you compile and execute a project, you can execute it in debug and release two configurations.
Debug mode is used to debug a program, which is a protected running environment that will tell you whether a program is leaking and can also check the results of a particular function at run time. However, the executable file it generates runs slowly.
So when your application is tested and ready for use, you should compile in release mode, which will generate an executable file for end users to use.
Simply put, debug can be debugged, check bugs, correct errors, and run slower.

Although the release can also interrupt the point, but sometimes the value of some variables in the release is invisible. Debug should be used with Debug.

There is an error in the cross call between the DLL and the EXE for release and debug, a very important reason, perhaps because of debug and release, the module's import address is not the same, even if you cancel all the optimizations, may not be able to change the outcome. Thus, for an object generated in an EXE (if it is release version) (such as a static global array), an object generated in a DLL may be located in a completely different memory region, thus the class (such as CString) that is judged by the value of the static pointer When a decision is made across a module, a serious logic error occurs, causing a run-time error to be freed of a piece of memory that should not have been freed.

The simplest and most reasonable way to resolve a cross call is to debug the debug version, and release to call releases, which may be a flaw in modularity.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.