|
Getting back to your original question about object cleanup. One must pay special attention to those pesky COM servers implemented as exe's. Its usually best pratice to explicitly call whatever disposal method is available to unwind the object and properly release memory. For example this:
break on
$ie = createobject("internetexplorer.application")
exit 1
creates an instance of IE running in the background and when the script finishes, properly releases the COM object by default, but this:
break on
$ie = createobject("internetexplorer.application") $ie.visible = 1
exit 1
cause IE to be stuck in memory and it continues to run. Even if one does this before exiting:
$ie = 0
no good. So one must call the Quit() method to properly wind things down. This applies to all the Office servers too like word and excel afaik. This problem isn't so much a problem with COM servers implemented as DLL's (like KF).
-Shawn
|