You can define a class able to hold of the data you will need, and keep a
small pool of them around to re-use the objects instead of allocating one
each time.  (This is what is already done for Message and MotionEvent.)

On Wed, Feb 18, 2009 at 11:56 AM, Al <[email protected]> wrote:

>
> I need to send some stuff to my gui thread and I'm doing this via a
> handler. But I regularly need to send more then 1 piece of information
> in one go and using the single Message.obj field won't work unless I
> use an Object array or something. I'd really like to avoid this so
> there is less object creation, is there a better I can send lots of
> info in one go? The amount of information I send can be of variable
> length, 1, 2 or 3 depending on the situation.
>
> Thanks.
> >
>


-- 
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.  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