几何尺寸与公差论坛------致力于产品几何量公差标准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:39 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】memory leaks when printing

memory leaks when printing
memory leaks when printing
hi,
i'm using the odamfcapp code to do printing in my own app, but am getting memory leaks when i bring up the page setup dialog and close it (3 leaks - 12,70 and 20 bytes). it seems to be in the call to setplottype that the memory is allocated, but i don't know what i have to do to release it? it also seems to happen during a call to setplotcfgname, (another 12, 70 and 20 bytes leaked), so it must be something about how i've set up the plotsettings stuff. but i can't get any further into the code to see what i've done wong. odamfcapp itself does not have this problem, so it must be something i've missed.
any thoughts from anyone?
regards
ali smith
hi,
i'll check it. what is used toolkit version ?
last edited by sslezkin; 14th december 2006 at 11:38 pmfff">.
i'm using v2.0.3.
thanks
ali
i recommend you to use our last release (2.2.0). i have fixed memory corruption bug in plot validator module and some significant defects also (invalid print preview generation and ...).
i cannot help you with memory leaks in your application. could you prepare small test to reproduce it with mfcapp ?
i will try to build with 2.2. i've been using 2.0.3, because when i built with 2.1 i kept getting crashes in the delete[] routine. i've now found that with 2.1 if i link in dd_alloc_dll.lib instead of using dd_vc2003md_alloc.lib it works fine. is this a known problem with 2.1?
now having got my app working under 2.1, i shall upgrade to 2.2 and see if i'm still ok, and if my memory leak also diappears. if not, i'll post a new message.
thanks for you help (so far!)
i need more information about delete crash in 2.1. can you describe steps to reproduce crash in mfcapp or prepare some code example?
ok, thanks.
well, this is a strange one, because it happens on my machine, but on my client's machine when he builds the app it doesn't happen. it's when i'm reading in a file and looking for blocks with particular attributes. when i find the block, i extract the attributes to a structure which is then added to an array for later use in the application. i've attached the code that extracts the attributes. what seems to happen is that the first time in it adds the first item to my carray, no problem. but next time in, it goes to add the next item, by expanding the array by one element in size. but when it's deleting the original buffer, having set up a new buffer with now the two items in it, it crashes in odrxfree(). i've also attached the call stack in case it might be of interest.
attached files (8.8 kb, 11 views)

you may just drop dd_alloc and insert your own odrxalloc/free functions, as described in
vladimir
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】memory leaks when loading a polyfacemesh yang686526 DirectDWG 0 2009-05-06 05:39 PM
【转帖】memory leaks plotsettingsvalidator yang686526 DirectDWG 0 2009-05-06 05:39 PM
【转帖】memory leaks in exhostappservices.cpp yang686526 DirectDWG 0 2009-05-06 05:38 PM
【转帖】huge memory leaks in pdf expor yang686526 DirectDWG 0 2009-05-06 03:28 PM
【转帖】dwf printing problems yang686526 DirectDWG 0 2009-05-05 07:51 AM


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


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