Current location - Health Preservation Learning Network - Slimming men and women - The Difference between Debugging and Publishing of C++ Dynamic Library in xcode
The Difference between Debugging and Publishing of C++ Dynamic Library in xcode
Debug is a debug version and release is a release version, which is a literal difference.

In fact, you can use a macro like #if_debug to insert a debug-specific version of the code without deleting it.

Secondly, in the debug version, xcode will insert some debugging-specific codes to simulate the test environment, but the release version will remove these codes for performance, which sometimes leads to inconsistent running results. If the code is written incorrectly, the release version may crash, so it is still necessary to test the release code specially.