Android: Incrementing an integer causes an allocation
<p>The following line appears in the allocations pane of eclipse:</p>

<pre><code>Alloc Order       Allocation Size           Allocated Class
509               12                        java.lang.Integer
</code></pre>

<p>It references this line of java code:</p>

<pre><code>MyInteger++;
</code></pre>

<p>I changed it around a little bit, but it still causes an allocation.</p>

<pre><code>MyInteger=MyInteger+1;
MyInteger=MyInteger+MyIntegerIncrementor;
</code></pre>

<p>Why do these lines of code cause an allocation?</p>
