几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量  


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » AutoCAD二次开发 » DirectDWG
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


 
 
主题工具 搜索本主题 显示模式
旧 2009-05-06, 05:36 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】memory leak in odamfcappdll

memory leak in odamfcappdll
memory leak in odamfcappdll
i use visualc++ v6.0 to copile the adamfcappdll.
i run the application then i close the application without do nothing.
i get this beautiful message
detected memory leaks!
dumping objects ->
{48} normal block at 0x01b34318, 33 bytes long.
data: < c > 00 43 00 cd cd cd cd cd cd cd cd cd cd cd cd cd
{47} normal block at 0x01b32c88, 40 bytes long.
data: < |l > 14 7c 4c 10 16 00 00 00 00 00 00 00 00 00 00 00
object dump complete.
the same thing happen when i run my simple application that use the .dll library.
help please.
tia.
sorry ,
i've forget to tell that i use the dwgdirect 1.13.
these 2 blocks of memory reported as leaks are freed in static objects destructors after the heap is scanned for leaked memory.
sergey slezkin
memory leaks
i have the same problem:
etected memory leaks!
dumping objects ->
{74134} normal block at 0x08415fe0, 12 bytes long.
data: <4=s )c > 34 3d 53 01 00 00 00 00 a4 29 43 08
{74133} normal block at 0x08432998, 36 bytes long.
data: < stat> 01 00 00 00 17 00 00 00 17 00 00 00 53 74 61 74
{47748} normal block at 0x084b6fe0, 12 bytes long.
data: <4=s > 34 3d 53 01 00 00 00 00 94 ff 07 03
{47747} normal block at 0x0307ff88, 36 bytes long.
data: < stat> 01 00 00 00 17 00 00 00 17 00 00 00 53 74 61 74
sorry! i have the problem in my application. but i hope the same is. i think the dwgdirect functionaly is wonderfull. how can i resolve my memory leek problem?
opendwg version: 1.13.02
zoltan
last edited by wscad; 18th october 2005 at 04:10 amfff">.

thank you very much for your answer.
my problem is this. my leaked memory place vary from run to run. how can i find the right place?
your example was verry exciting and useful with static memory leaks.
have you any idea?
zoltan
hi! thanks a lot for your tip.
with your instruction i have found the function wich cause memory leaks.
prec->zoomextents(); after oddbviewporttablerecordptr prec...
show this code:
if (pdb->gettilemode())//if (actspace == acmodelspace)
{
oddbviewporttableptr pvptbl = pdb->getviewporttableid().safeopenobject();
oddbobjectid id = pvptbl->getactiveviewportid();
if (id)
{
oddbviewporttablerecordptr prec = id.safeopenobject (oddb::kforwrite);
prec->zoomextents();
}
}
else
{
oddbblocktablerecordptr pblcltblrec = pdb->getactivelayoutbtrid().safeopenobject();
oddblayoutptr playout = pblcltblrec->getlayoutid().safeopenobject();
oddbobjectid actid = playout->activeviewportid();
if (actid)
{
oddbviewportptr pvp = actid.safeopenobject(oddb::kforwrite);
pvp->zoomextents();
}
}
quote:
originally posted by sergey slezkin
if number of leaked memory allocation varies from run to run try the following:
set a break point in your programm (for example before readfile()). after reaching this break point set break point at memory allocation and remember the allocation number (n). remove break point, perform actions required in your application and exit. look at leaked block allocation number and remember it (l).
repeat the steps above. be sure that (l-n) is constant value from run to run. if so - you can calculate the required number for the next run having seen new n value.
if (l-n) is not constant - try to set breakpoint in other place closer to expected leaked block allocation.
how do you set a break point at the memory allocation?? i am looking at crtdbg.h and i can't put a break-point any where.
thanks
actually i need not zoomextent function. whitout this i have not memory leaks.
last edited by wscad; 25th october 2005 at 11:07 pmfff">.
wscad
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】memory leak in oda 2.1.01 yang686526 DirectDWG 0 2009-05-06 05:35 PM
【转帖】memory leak dwgdirect 2.0.2 yang686526 DirectDWG 0 2009-05-06 05:35 PM
【转帖】has gdi leak yang686526 DirectDWG 0 2009-05-05 11:46 AM
【转帖】gdi resource leak 9workaround0 yang686526 DirectDWG 0 2009-05-05 11:10 AM
【转帖】does this file cause a leak yang686526 DirectDWG 0 2009-05-04 08:02 PM


所有的时间均为北京时间。 现在的时间是 02:53 AM.


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多