The framework owns those objects, and recycles them when you return.  You
will need to make a copy if you want to hold on to something for later.

On Fri, Sep 11, 2009 at 2:35 AM, Robert Green <[email protected]> wrote:

>
> I decided to start pipelining input to increase responsiveness in my
> games.  Basically what I do is when the activity receives a Key or
> Motion event, it sends it to a feed method in the game, which
> encapsulates it with a time and whatever else I need and puts it in a
> queue then immediately returns so the UI loop is never held up waiting
> for long.  The main loop later processes the queue, applying the
> events in it at the appropriate times.
>
> This works great and makes the games snappy, although now I'm starting
> to miss touch events intermittently.  I realized that the events could
> be recycled objects and that could make them not safe to queue.  Is
> this the case or is it safe to queue them for deferred processing like
> I'm doing?
> >
>


-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to