DIspose Process (#10918)
This commit is contained in:
@@ -901,7 +901,7 @@ namespace Umbraco.Core.Persistence
|
||||
return -1;
|
||||
}
|
||||
|
||||
var p = new Process
|
||||
using (var p = new Process
|
||||
{
|
||||
StartInfo =
|
||||
{
|
||||
@@ -913,13 +913,16 @@ namespace Umbraco.Core.Persistence
|
||||
CreateNoWindow = true,
|
||||
WindowStyle = ProcessWindowStyle.Hidden
|
||||
}
|
||||
};
|
||||
p.Start();
|
||||
output = p.StandardOutput.ReadToEnd();
|
||||
error = p.StandardError.ReadToEnd();
|
||||
p.WaitForExit();
|
||||
})
|
||||
{
|
||||
p.Start();
|
||||
output = p.StandardOutput.ReadToEnd();
|
||||
error = p.StandardError.ReadToEnd();
|
||||
p.WaitForExit();
|
||||
|
||||
return p.ExitCode;
|
||||
return p.ExitCode;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user