DEV Community

Discussion on: The uninitialized variable anathema: non-deterministic C++

Collapse
 
mortoray profile image
edA‑qa mort‑ora‑y

It may not be intentional that they are zero-initialized in DEBUG mode. They just happen to use freshed memory, and memory reuse is less aggressive.

I compile often with optmizations on, and still get lots of zeros in uninitialized areas.