退出后是否需要关闭命令行进程

时间:2015-04-11 14:12:00

标签: c#

我正在使用ffprobe.exe获取有关视频文件的信息。

Process probe = new Process();
probe.StartInfo.FileName = "\"" + ffmpegFolder + "ffprobe.exe\"";
probe.StartInfo.Arguments = "-select_streams v -show_entries stream=duration \"" + path + name + "\"";
probe.StartInfo.UseShellExecute = false;
probe.StartInfo.RedirectStandardOutput = true;
probe.Start();
string s = probe.StandardOutput.ReadToEnd();
probe.WaitForExit();

进程退出后是否需要调用probe.Close()

0 个答案:

没有答案