how to solve error for object double free set a breakpoint in malloc_error_break to debug
<p>hi i am new to iphone. what i am doing is placing a button and while clicking the button it will display the image and i need to change the image for each button click for i am  writing if loop like </p>

<pre><code>if(counter[button.tag] = 2) { [images exchangeObjectAtIndex:0 withObjectAtIndex:1 ]; }
</code></pre>

<p>but images are not exchanged it shows like this in console</p>

<pre><code>error for object double free set a breakpoint in malloc_error_break to debug
</code></pre>

<p>how can i solve this. i did n't understand what is this problem why it comes pls help me. thank u in advance. </p>
