Uninitialized memory blocks in VC++

前端 未结 15 1276
鱼传尺愫
鱼传尺愫 2020-12-19 08:49

As everyone knows, the Visual C++ runtime marks uninitialized or just freed memory blocks with special non-zero markers. Is there any way to disable this behavior entirely w

15条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-19 09:12

    VC++'s behaviour shouldn't cause havoc with any valid check you can do. If you are seeing the 0xfeeefeee then you haven't written to the memory (or have freed it), so you shouldn't be reading from the memory anyway.

提交回复
热议问题