Memory leack caused by executing "su"
<pre><code>Process process = Runtime.getRuntime().exec("su");
</code></pre>

<p>When running above command on <strong>rooted</strong> phone everything works fine</p>

<p>But when i try same code on <strong>non-rooted</strong> device its causing memory leak, i can see multiple instances of my app in task manager and they cant bee killed. The more times i run this code memory gets less and less until phone totally freezes and i have to restart</p>

<p>This is the exception i get </p>

<pre><code>01-24 11:06:56.459: E/App (8307): Error running exec(). Command: [su] Working Directory: null Environment: null
</code></pre>

<p>Why is this hapening and how can i prevent it?</p>
