How to release or clear the value of variable or object?
<p>I have an application in which I have used some variables and I want to release or free the memory space used by them after using them or on application close. Is there any process of doing this?</p>

<p>I have used:</p>

<pre><code>int x = Integer.parseInt(edt.getText().toString()) * Integer.parseInt(edt1.getText().toString());
String z = String.valueOf(x);
</code></pre>

<p>edt - Stands For EditText which I have been used for entering the value. </p>

<p>After entering the value into the EditText, whenever I'll switch to my next activity page and then get back on my previous page the value of EditText is still available on it. But I want to clear the value of the variable.</p>

<p>How can I achieve this?</p>
