Release and Debug compilation in Qt
Laycee last edited by
The question of an interesting nature, why one and the same code after the Debug compilation works well, and the Release does not work as it is.
jeanid last edited by
In an advanced mode, an objective file contains many extraneous items for the operational work of the information programme. In particular, there may be a situation where the programme uses reading uninitiated memory. This action results, in general, in the reading of debris. However, in the propulsion mode, all such memory may be impractical (because of the optimization, for example) initiated by something specific, such as zeros.
In this case, the elementary type code:
int k; std::cout << k << '\n'
may extradite or
0or any random number.
If the logic of the programme depends on reading a non-initiated memory, the behaviour of the programme in the correct and release regimes may differ.