Android Error: Memory Issues?
<p>so i came across some errors and i've searched it up. it seems i have some memory issues. but im not quite sure on how to solve it. here's the codes where i believe the problem lies with and also the error log. any help would be highly appreciated</p>

<pre><code>static List&lt;Dragon&gt; mdragon = new ArrayList&lt;Dragon&gt;();
private int mdragon_number = 0;

   @Override
public boolean onTouchEvent(MotionEvent event) {
    synchronized (mdragon) {
        mdragon.add(new Dragon(getResources(), (int) event.getX(),
                (int) event.getY()));
        mdragon_number = mdragon.size();
    }
    return super.onTouchEvent(event);
}

public void Remove(long elapsed, Canvas canvas) {
    synchronized (mdragon) {
        List&lt;Dragon&gt; toRemove = new ArrayList&lt;Dragon&gt;();
        for (Dragon dragon : mdragon) {
            if (Condition to remove an element) 
                toRemove.add(dragon);
            }
            mdragon.removeAll(toRemove);
    }
}
</code></pre>

<p>Error Log below:</p>

<pre><code>07-13 02:11:46.814: ERROR/AndroidRuntime(280): FATAL EXCEPTION: main
07-13 02:11:46.814: ERROR/AndroidRuntime(280): java.lang.OutOfMemoryError: bitmap size exceeds VM budget
07-13 02:11:46.814: ERROR/AndroidRuntime(280):     at android.graphics.Bitmap.nativeCreate(Native Method)
07-13 02:11:46.814: ERROR/AndroidRuntime(280):     at android.graphics.Bitmap.createBitmap(Bitmap.java:468)
07-13 02:11:46.814: ERROR/AndroidRuntime(280):     at android.graphics.Bitmap.createBitmap(Bitmap.java:435)
07-13 02:11:46.814: ERROR/AndroidRuntime(280):     at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:340)
07-13 02:11:46.814: ERROR/AndroidRuntime(280):     at android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:488)
07-13 02:11:46.814: ERROR/AndroidRuntime(280):     at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:462)
07-13 02:11:46.814: ERROR/AndroidRuntime(280):     at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:323)
07-13 02:11:46.814: ERROR/AndroidRuntime(280):     at android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:346)
07-13 02:11:46.814: ERROR/AndroidRuntime(280):     at android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:372)
</code></pre>
