如何修复内存泄漏?
我有这个游戏服务器,无论我下载预编译的二进制文件还是自己编译源代码都会泄漏,直到我必须重新启动或进入 BSOD。我对 C++ 不太热衷,目前只是我的学位课程,但我可以查看代码并了解发生了什么。我只是不“流利”。
具体来说,查看资源监视器,修改后的内存类型只会填充并不断填充,每 5 秒约 3-5MB,
对此我能做些什么吗?
I've got this game server that whether i download the pre-compiled binary or compile the source code myself just leaks until i have to reboot or enter a BSOD. I'm not super keen on C++ just currently classes for my degree but i can look at the code and understand whats going on. I'm just not 'fluent'.
Specifically looking at the resource monitor the modified memory type just fills and fills constantly by about 3-5MB per 5 seconds
is there anything i can do about this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有一个工具有助于查找内存泄漏:http://valgrind.org/
There is tool which is helpful for finding memory leaks: http://valgrind.org/
如果您曾经听说过名为
valgrind
的工具,您可以在 valgrind 中运行 C++ 代码来准确查看泄漏位置。http://valgrind.org/
If you have ever ever heard about a tool called
valgrind
you can run your C++ code in valgrind to see exactly where the leakages are.http://valgrind.org/