Is memory initialized to zero on all platforms and build configurations?
Yes, all non-local variables are initialized to zero.
(i.e. is a C ++ standard)
Yes. C ++ 11 3.6.2 indicates how non-local variables are initialized. In particular:
- Variables with static storage duration or stream storage duration must be zero initialized before any other initialization.
source share