The information in this article applies to:
The information in this article is included in the documentation starting with Visual C++ 5.0. Look there for future revisions. SYMPTOMSWhen you run the debug version of your MFC application, there are no problems. However, the release version of the same application crashes, returns incorrect results, and/or exhibits some other abnormal behavior. CAUSEThis problem can be caused when you place important code in an ASSERT statement to verify that it performs correctly. Because ASSERT statements are commented out in a release build of an MFC program, the code does not run in a release build. RESOLUTION
If you are using ASSERT to confirm that a function call succeeded, consider
using VERIFY instead. The VERIFY macro evaluates its own arguments in both
debug and release builds of the application. MORE INFORMATIONExamine the following code fragment:
This code runs perfectly in a debug version of an MFC application. If the
call to calloc() fails, a diagnostic message is displayed, which includes
the file and line number. However, in a retail build of an MFC application:
-or- -or-
Or, you can use VERIFY instead:
Additional query words: 7.00 1.00 1.50 2.00 2.10 2.50 2.51 2.52 3.00 3.10 hang gpf gp-fault 4.00
Keywords : kbnokeyword kbMFC kbVC |
Last Reviewed: July 27, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |