怎么找垃圾? [英] How to find garbage?

查看:85
本文介绍了怎么找垃圾?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我分配的数据有问题但从不免费。在某处:
https: //git.rwth-aachen.de/carstenf/OpenGL/blob/master/MshViewer/Source/OpenGlController.cpp#L367


我分配数据。但我不知道所有这些我不自由:在从主要回报0之前:
http://i.imgur.com/AdyqDb7.jpg


也许你可以看一下我的析构函数:
https://git.rwth-aachen.de/carstenf/ OpenGL / blob / master / MshViewer / Source / OpenGlController.cpp#L22
并找到我不删除的部分。我认为这是这样的:

https://git.rwth-aachen.de/carstenf/OpenGL/blob/master/MshViewer/Header/Object.h#L27
我不删除此功能:
https ://git.rwth-aachen.de/carstenf/OpenGL/blob/master/MshViewer/Source/OpenGlController.cpp#L110


我希望你能找到变量我不删除或告诉我找到分配部分的技巧,所以我可以更好地找到应该删除它的部分。

解决方案

Hi HyperV2,


感谢您在此发布。


>> ;我希望你能找到我不删除的变量,或者告诉我一个技巧,找到它被分配的部分,所以我可以更好地找到它所在的部分应删除。


对于这种情况,我建议您尝试这两种方式。


1。使用CRT库。  Visual Studio调试器和C运行时(CRT)库为您提供了检测和识别内存泄漏的方法。


2。使用工具调试内存泄漏。例如:


应用程序验证器

Windows调试工具

用户模式转储堆

跟踪捕获,处理和分析工具

CRT调试堆


有关详细信息,请参阅以下这些文档。


https://msdn.microsoft.com/en-us/library/ x98tx3cf.aspx?f = 255& MSPPError = -2147217396


https://msdn.microsoft.com/en-us/library/windows/desktop/dd744766(v = vs.85)的.aspx


希望这可以帮到你。


最好的问候,


Sera Yu


Hi,

i have a problem with data i allocated but never free. Somewhere here: https://git.rwth-aachen.de/carstenf/OpenGL/blob/master/MshViewer/Source/OpenGlController.cpp#L367

I allocate the data. But i don't know what of all these i don't free: just before the return 0 from main: http://i.imgur.com/AdyqDb7.jpg

Maybe you can take a look at my destructor: https://git.rwth-aachen.de/carstenf/OpenGL/blob/master/MshViewer/Source/OpenGlController.cpp#L22 and find the part i don't delete. I think it's something of this: https://git.rwth-aachen.de/carstenf/OpenGL/blob/master/MshViewer/Header/Object.h#L27 that i don't delete in the this function: https://git.rwth-aachen.de/carstenf/OpenGL/blob/master/MshViewer/Source/OpenGlController.cpp#L110

I hope you can find the variable i don't delete or tell me a trick to find the part where it is allocated, so i can better find the part where it should be deleted.

解决方案

Hi HyperV2,

thanks for posting here.

>>I hope you can find the variable i don't delete or tell me a trick to find the part where it is allocated, so i can better find the part where it should be deleted.

For this case, I suggest you try these two ways.

1. Use CRT library. The Visual Studio debugger and C Run-Time (CRT) libraries provide you with the means for detecting and identifying memory leaks.

2. Use tools to debug memory leak. For example:

Application Verifier
Debugging Tools for Windows
User-Mode Dump Heap
Trace Capture, Processing, and Analysis Tool
CRT Debug Heap

For more information, please refer to these documents below.

https://msdn.microsoft.com/en-us/library/x98tx3cf.aspx?f=255&MSPPError=-2147217396

https://msdn.microsoft.com/en-us/library/windows/desktop/dd744766(v=vs.85).aspx

Hope this could be help of you.

Best Regards,

Sera Yu


这篇关于怎么找垃圾?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆