title: Touch event pool was exhausted
body: <p>I have a touch problem. I have some word sprites, and I bind the touch event (below) to them.
  After I touch one of them a few times consecutively and them want to drag, firstly the touch event does not respond, but if I wait a second then I can drag. In the <a href="https://sites.google.com/site/androidhowto/how-to-1/save-logcat-to-a-text-file" rel="nofollow">LogCat</a> I get this:</p>
  
  <blockquote>
    <p>12-28 17:23:58.979: V/AndEngine(23295): org.andengine.util.adt.pool.PoolUpdateHandler$1 was exhausted, with 1 item not yet recycled. Allocated 1 more.</p>
  </blockquote>
  
  <p>How do I fix this problem?</p>
  
  <p>Here is the touch event code:</p>
  
  <pre><code>public boolean onAreaTouched(TouchEvent pSceneTouchEvent, float pTouchAreaLocalX, float pTouchAreaLocalY)
  {
      switch(pSceneTouchEvent.getAction()) {
          case TouchEvent.ACTION_DOWN:
              this.mGrabbed = true;
              break;
  
          case TouchEvent.ACTION_MOVE:
              if(this.mGrabbed)
                  this.setPosition(pSceneTouchEvent.getX() - 18, pSceneTouchEvent.getY() - 15);
              break;
  
          case TouchEvent.ACTION_UP:
              if(this.mGrabbed)
              {
                  this.mGrabbed = false;
                  boolean found = false;
                  float x1,x2,y1,y2;
                  if(this.getY() &lt; 350)
                  {
                      for(int i = 0; i &lt; positions_list.size(); i++)
                      {
                          if((word_object_list.get(a).getName().equals(positions_list.get(i).getName())) &amp;&amp; positions_list.get(i).isFree())
                          {
                              x1 = word_object_list.get(a).getSprite().getX();
                              y1 = word_object_list.get(a).getSprite().getY();
                              x2 = positions_list.get(i).getxPosition();
                              y2 = positions_list.get(i).getyPosition();
                              x1 = Math.abs(x2-x1);
                              y1 = Math.abs(y2-y1);
                              x1 = (float) Math.pow(x1,2);
                              y1 = (float) Math.pow(y1, 2);
                              x1 = x1+y1;
                              x1 = (float) Math.sqrt(x1);
                              if(x1 &lt; 20)
                              {
                                  // Set hint's visibility false
                                  if(i == 0 &amp;&amp; sprite_word_hint_1 != null)
                                      sprite_word_hint_1.setVisible(false);
                                  if(i == random_hint_position &amp;&amp; sprite_word_hint_2 != null)
                                      sprite_word_hint_2.setVisible(false);
  
                                  word_object_list.get(a).getSprite().setVisible(false);
                                  sprite_word_true_list.get(i).setVisible(true);
                                  sprite_candy_list.get(finish_state).setVisible(true);
                                  finish_state ++;
  
                                  if(finish_state == question.getWord().length())
                                  {
                                      // Create new scene
                                      Game_Screen.this.getEngine().registerUpdateHandler(new TimerHandler(6.5f, new ITimerCallback() {
                                          public void onTimePassed(TimerHandler pTimerHandler) {
                                              // TODO Auto-generated method stub
  
                                              Game_Screen.this.getEngine().setScene(load_new_scene());
                                              remove_textures();
                                          }
                                      }));
  
                                      // Increase point
                                      Game_Screen.this.getEngine().registerUpdateHandler(new TimerHandler(4.3f, new ITimerCallback() {
                                          public void onTimePassed(TimerHandler pTimerHandler) {
                                              // TODO Auto-generated method stub
                                              int point = variables.getDatabase().get_point(variables.getCategory_level())+question.getWord().length();
                                              elapsedText.setText(""+point);
                                              variables.getDatabase().set_answered(question);
                                              variables.getDatabase().update_user(question, question.getWord().length(), hint_used);
                                          }
                                      }));
  
                                      // Cover animation
                                      sprite_cover.setRotationCenter(sprite_cover.getRotationCenterX()+20, sprite_cover.getRotationCenterY());
                                      sprite_cover.registerEntityModifier(new SequenceEntityModifier(
                                              new DelayModifier(1),
                                              new RotationModifier(1.5f, 0, 90),
                                              new DelayModifier(1.7f),
                                              new RotationModifier(1, 90, -0)
                                          )
                                      );
                                      // Candy animation
                                      for(int j = 0; j &lt; sprite_candy_list.size(); j++)
                                      {
                                          sprite_candy_list.get(j).registerEntityModifier(new SequenceEntityModifier(
                                                  new DelayModifier(2.7f),
                                                  new CubicBezierCurveMoveModifier( 1.5f,  sprite_candy_list.get(j).getX(), sprite_candy_list.get(j).getY(),  165, 240, 166, 241, 275, 400, EaseQuadIn.getInstance()),
                                                  new DelayModifier(0.2f),
                                                  new AlphaModifier(1, 1, 0)
                                                  )
                                          );
                                      }
                                  }
                                  positions_list.get(i).setFree(false);
                                  found = true;
                                  break;
                              }
                          }
                      }
                  }
                  if(!found)
                  {
                      word_object_list.get(a).getSprite().registerEntityModifier(new MoveModifier(1, word_object_list.get(a).getSprite().getX(), word_object_list.get(a).getPositionX(), word_object_list.get(a).getSprite().getY(), word_object_list.get(a).getPositionY(),EaseQuadIn.getInstance()));
                  }
              }
              break;
  
      }
      return true;
  }
  </code></pre>