code: private void releaseID(int id) {
          ids.removeInt(id);
          nextID = 1;
          for (int i = 0; i < ids.size(); i++) {
              nextID = Math.max(ids.get(i) + 1, nextID);
          }
      }
docs: Release a touch point ID