public override void Dispose() { try { if (ProcessHandle != null) { ProcessHandle.Dispose(); ProcessHandle = null; } SafeMemoryHandle.CloseHandle(ThreadHandle); if (Asm != null) { Asm.Dispose(); } base.Dispose(); } catch (Exception ex) { Trace.WriteLine(ex); } }