ComObject廃棄
ComObject廃棄
変数廃棄
Remove-Variable aaa
例
$x = New-Object -com Excel.Application $x.Visible = $True Start-Sleep 5 $x.Quit() [System.Runtime.Interopservices.Marshal]::ReleaseComObject($x) Remove-Variable x
参考
https://technet.microsoft.com/en-us/library/ff730962.aspx
wpfオブジェクト廃棄
.netの世界ではリファレンスカウンタ処理。参照解除を忘れずに。
.Net Com Object作成