Today meet such a bug, when initial a struct with a redundant bytes, using struct a = {0}; the release build and debug build acts differently!
In the debug build, the redundant bytes are filled with 0xcc, while in the release build the redundant bytes are filled with 0x00.
Solution:
1 Use #pragma pack(1) . it’s better way, with more capacity, and efficiency.
2 call ZeroMemory().