几何尺寸与公差论坛

 找回密码
 注册
查看: 584|回复: 0

【转帖】cleanup after add-in execution

[复制链接]
发表于 2009-4-13 09:44:15 | 显示全部楼层 |阅读模式
cleanup after add-in execution
how do i cleanup anything left behind and for all practical purposes kill the process executed by an add-in after it's completed and/or crashes?
i have an add-in w/ a few functions... one of which is to print a set of drawings selected via the common open dialog box. the user also selects a couple options using checkboxes on a form. the first time i ran it everything seemed to run great.
the second time i ran it... the form remembered my previously selection (which tells me i'm not disposing of items as i should) and it didn't run properly.
thx,
eric
you need to post some code.
it sounds to me that you're creating a thread (printing) from a form and closing the form before it's done.
if you are using c++ and are unaware of garbage collection and correct methods to dispose of objects i would highly recommend buying a book on the matter or googling about it as it is very important to clean up after.
if you are using .net i wouldnt worry too much as the gc automatically collects any lost pointers or undisposed objects when the scope is lost in your application. but even so you should stil ideally manage the disposal within your code
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-12-24 21:26 , Processed in 0.036438 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

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