DirectoryServices.DirectoryEntry で dispose できない罠
powershellの話。(ver1.0)
確認ロジック
$target = New-Object DirectoryServices.DirectoryEntry( 'LDAP://rootDSE' ) if ( !($target -is [IDisposable]) ) { return; } $target.Dipose();
ちなみに GetType もできないし。
なんかのラッパーなのかと思うけどそれなら IDisposable 返すなよ。