读书人

内存泄漏。该怎么处理

发布时间: 2013-12-06 17:56:43 作者: rapoo

内存泄漏。
内存泄漏,麻烦大神门再详解下。我使用了Visual Leak Detector,程序先抱内存泄漏,然后VLD又退出了又说没有泄漏了。小弟不是很懂。请各位指导下。。
代码如下

'TrafficDetectByVideo.exe': Unloaded 'D:\Program Files\FreeTime\FormatFactory\FFModules\Filters\ffdshow\xvidcore.dll'
The thread 'Win32 Thread' (0x1220) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1dd4) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1ff8) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x40c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x3e8) has exited with code 0 (0x0).
'TrafficDetectByVideo.exe': Unloaded 'D:\Program Files\FreeTime\FormatFactory\FFModules\Filters\ffdshow\libavcodec.dll'
'TrafficDetectByVideo.exe': Unloaded 'D:\Program Files\FreeTime\FormatFactory\FFModules\Filters\ffdshow\libmplayer.dll'
'TrafficDetectByVideo.exe': Unloaded 'C:\Windows\System32\ff_vfw.dll'
第一
'TrafficDetectByVideo.exe': Unloaded 'C:\Users\Administrator\Desktop\TrafficDetect\TrafficDetectByVideo\lib\MSCHRT20.OCX'
'TrafficDetectByVideo.exe': Unloaded 'C:\Users\Administrator\Desktop\TrafficDetect\TrafficDetectByVideo\lib\MSWINSCK.OCX'
'TrafficDetectByVideo.exe': Unloaded 'C:\Windows\System32\wsock32.dll'
'TrafficDetectByVideo.exe': Unloaded 'C:\Program Files\360\360safe\safemon\360UDiskGuard.dll'
'TrafficDetectByVideo.exe': Unloaded 'C:\Program Files\Common Files\microsoft shared\ink\tiptsf.dll'
The thread 'Win32 Thread' (0xbc) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1538) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1e3c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1e94) has exited with code 2 (0x2).
The thread 'Win32 Thread' (0x1710) has exited with code 2 (0x2).
The thread 'Win32 Thread' (0xafc) has exited with code 2 (0x2).
The thread 'Win32 Thread' (0x1fec) has exited with code 2 (0x2).
The thread 'Win32 Thread' (0x1c00) has exited with code 2 (0x2).
The thread 'Win32 Thread' (0x1898) has exited with code 2 (0x2).
The thread 'Win32 Thread' (0x1e38) has exited with code 2 (0x2).
The thread 'Win32 Thread' (0x1e98) has exited with code 2 (0x2).
The thread 'Win32 Thread' (0x1128) has exited with code 2 (0x2).
The thread 'Win32 Thread' (0x1fcc) has exited with code 2 (0x2).
The thread 'Win32 Thread' (0x1ad4) has exited with code 2 (0x2).
'TrafficDetectByVideo.exe': Loaded 'C:\Windows\System32\netutils.dll', No symbols loaded.
Detected memory leaks!
Dumping objects ->
{63} normal block at 0x02EB0068, 112896 bytes long.
Data: < > 91 92 94 94 92 92 91 92 94 93 91 92 90 8D 8C 8F
Object dump complete.
No memory leaks detected.
Visual Leak Detector is now exiting.
The program '[4820] TrafficDetectByVideo.exe: Native' has exited with code 2 (0x2).




[解决办法]
“{63} normal block at 0x02EB0068, 112896 bytes long.
Data: < > 91 92 94 94 92 92 91 92 94 93 91 92 90 8D 8C 8F ”
点击可以到 泄漏处。
[解决办法]
无法跳转到那边的话你也应该要以查一下,哪边分配了近112b的空间。

引用:
“{63} normal block at 0x02EB0068, 112896 bytes long.
Data: < > 91 92 94 94 92 92 91 92 94 93 91 92 90 8D 8C 8F ”


点击可以到 泄漏处。


[解决办法]
引用:
Quote: 引用:

无法跳转到那边的话你也应该要以查一下,哪边分配了近112b的空间。

Quote: 引用:

“{63} normal block at 0x02EB0068, 112896 bytes long.
Data: < > 91 92 94 94 92 92 91 92 94 93 91 92 90 8D 8C 8F ”
点击可以到 泄漏处。

能讲下具体的方法么。如怎样查?小弟我不是很懂。初学



1、“{63} normal block at 0x02EB0068, 112896 bytes long.
Data: < > 91 92 94 94 92 92 91 92 94 93 91 92 90 8D 8C 8F ”

对着这一行双击,看能不能跳转到对应的代码行处。

2、仔细检查代码,看是否哪里有new 没有对应的 free.

3、注销部分代码,逐步排查,看是哪段代码出了问题。

读书人网 >VC/MFC

热点推荐