Debug / Release Mode
|
 |
At compile time Str Library needs to know whether it is compiled in Debug or
Release mode. The major differences between the two are:
-
In debug mode, most optimizations are turned off
-
In debug mode, Str Library allocates more memory than strictly needed and
attempts to detect buffer overwrite and stray pointer issues
-
In debug mode, when thread safety is also enabled, Str Library makes sure that
for non-MT-marked objects, only the creator thread attempts modify operations
-
In debug mode, several unusual conditions that represent programming errors are
checked in the code and an ASSERT-ion is thrown if a bad state is detected.
Programs using Str Library should always be compiled with one of the following
two conditional symbols defined:
#define _DEBUG
#define NDEBUG
See also: Str conditional defines