你好,
这是由于debug模式和release模式处理变量内存时稍有不同。通常在debug模式下编译器会帮我们初始化内存地址(赋值0),而在release模式下,他会保持此内存块在分配之前所保留的内容。当程序运行时,如果没有对变量进行适当的初始化,在debug模式下可能还好(因为自动为0),在release下则可能造成诸如非法访问的错误导致程序奔溃。所以强烈建议你复查你的代码,尤其在出问题的代码块,是否有类似情况存在。
谢谢
Yi
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.