找回密码
 用户注册

QQ登录

只需一步,快速开始

查看: 3964|回复: 4

ACE与MFC一起使用时的内存泄露问题?

[复制链接]
发表于 2010-8-25 16:19:26 | 显示全部楼层 |阅读模式
请高手看一下,最近用ACE时,在VS2010下,控制台不会有内存泄露,可是和MFC一起时总是有内存泄露的问题,该怎么解决呢?

Detected memory leaks!
Dumping objects ->
{144} normal block at 0x01909F40, 8 bytes long.
Data: <   U    > C4 E1 A7 55 00 00 00 00
{142} normal block at 0x01909E28, 28 bytes long.
Data: <(      P        > 28 9E 90 01 A4 E6 C2 50 00 00 00 00 00 00 00 00
{141} normal block at 0x01909DE0, 8 bytes long.
Data: <        > 98 9D 90 01 CD CD CD CD
{140} normal block at 0x01909D98, 8 bytes long.
Data: <       P> E0 9D 90 01 90 C4 C2 50
{139} normal block at 0x01909D48, 16 bytes long.
Data: <           P    > E0 9D 90 01 01 00 00 00 A4 E6 C2 50 CD CD CD CD
{138} normal block at 0x01909C80, 136 bytes long.
Data: <                > 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00
{135} normal block at 0x01909C28, 24 bytes long.
Data: <(      P        > 28 9C 90 01 A4 E6 C2 50 00 00 00 00 00 00 00 00
{134} normal block at 0x01909BE0, 12 bytes long.
Data: <(          P> 28 9C 90 01 00 00 00 00 A4 E6 C2 50
{133} normal block at 0x01907BA0, 8192 bytes long.
Data: <                > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
{132} normal block at 0x01907B38, 40 bytes long.
Data: <         {   6Q > 00 00 00 00 00 04 00 00 A0 7B 90 01 10 36 51 00
{131} normal block at 0x01907AD8, 32 bytes long.
Data: <,  P 5Q         > 2C FB B8 50 D8 35 51 00 FF FF FF FF 00 00 00 00
{130} normal block at 0x01907A70, 44 bytes long.
Data: <             M P> 00 CD CD CD 00 04 00 00 00 00 00 00 E0 4D B9 50
{129} normal block at 0x01904730, 13060 bytes long.
Data: <                > 00 00 00 00 00 00 00 00 FF FF FF FF 00 00 00 00
{128} normal block at 0x019046C8, 44 bytes long.
Data: <    h5Q         > 00 00 00 00 68 35 51 00 FF FF FF FF 00 00 00 00
{127} normal block at 0x01904670, 28 bytes long.
Data: <05Q             > 30 35 51 00 FF FF FF FF 00 00 00 00 00 00 00 00
{126} normal block at 0x01904600, 52 bytes long.
Data: < K PtK P K Ppz  > 94 4B B9 50 74 4B B9 50 88 4B B9 50 70 7A 90 01
Object dump complete.
发表于 2010-8-25 16:47:51 | 显示全部楼层
ACE有专门的MFC版本,需要单独编译,另外需要自己手工调用init和fini
 楼主| 发表于 2010-8-26 10:50:05 | 显示全部楼层
是在前面加“#define ACE_HAS_MFC 1 ”吗?我加了再编译,使用使还是有这样的问题。。
发表于 2010-8-26 11:44:42 | 显示全部楼层
1、用工具查,purify/boundschecker等。
2、一次性内存泄漏不可怕,不要过分担心。可能是设计原因导致。重要的是不要有反复生成的泄漏。
 楼主| 发表于 2010-8-26 21:16:52 | 显示全部楼层
搞不定哇。。。555
您需要登录后才可以回帖 登录 | 用户注册

本版积分规则

Archiver|手机版|小黑屋|ACE Developer ( 京ICP备06055248号 )

GMT+8, 2024-11-22 07:02 , Processed in 0.012402 second(s), 5 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表