调试时内存泄漏
我有一个在Visual Studio上在C上写的代码。 当我在调试模式下运行它时,即使我不使用任何Malloc,Calloc或其中一个功能,也不会尝试打开任何文件或目录,也会获得内存泄漏。 当我在发布模式下运行相同的代码时,但是我没有内存泄漏。 我有两个问题:
- 两种模式之间的区别实际上是什么区别,
- 为什么我只在调试时才会泄漏?有人曾经面临过这个问题吗?我能做什么?
I have a code that I wrote in C on visual studio.
when I run it on debug mode I get memory leaks, even when I don't use any malloc or calloc or one of those functions, and don't attempt to open any file or directory.
when I run the same code on Release mode however I get no memory Leaks.
I have two questions:
- what is actually the difference between the two modes
- why am I getting leaks only on Debug? has someone ever faced this problem? is there something I can do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论