Is it a mandatory to wrap a System.Diagnostics.Process with using when I don't know whether the executable being invoked is managed or native?
<p>Is it a mandatory to wrap a <code>System.Diagnostics.Process</code> with <code>using</code> when I don't know whether the executable being invoked is managed or native? </p>

<p><strong>Code 1:</strong></p>

<pre><code>        Process p = new Process();

        p.EnableRaisingEvents = true;
        p.Exited += new EventHandler(p_Exited);

        p.StartInfo.Arguments = "-interaction=nonstopmode " + inputpath;
        p.StartInfo.WorkingDirectory = dir;

        p.StartInfo.UseShellExecute = false;
        p.StartInfo.FileName = "pdflatex.exe";

        p.StartInfo.LoadUserProfile = true;

        p.Start();
        p.WaitForExit();
</code></pre>

<p>or </p>

<p><strong>Code 2:</strong></p>

<pre><code>        using (Process p = new Process())
        {

            p.EnableRaisingEvents = true;
            p.Exited += new EventHandler(p_Exited);

            p.StartInfo.Arguments = "-interaction=nonstopmode " + inputpath;
            p.StartInfo.WorkingDirectory = dir;

            p.StartInfo.UseShellExecute = false;
            p.StartInfo.FileName = "pdflatex.exe";

            p.StartInfo.LoadUserProfile = true;

            p.Start();
            p.WaitForExit();
        }
</code></pre>

<p>?</p>

<h2>Edit 1</h2>

<p>Let consider the code 1 above, what will happen when the <code>pdflatex.exe</code> gets crashed?</p>
