If they have state associated with them, it can avoid a lot of errors to not
re-use a stale object.

On Thu, Aug 6, 2009 at 4:27 PM, Jason Proctor <[email protected]
> wrote:

>
> i must admit i don't quite understand these implementation decisions.
> one-use classes don't make much sense to me. why not make something
> reusable if you can?
>
>
>
> >An AsyncTask instance can be used only once indeed. And they're not
> >meant to be created/started dozens of times per second so the GC will
> >be just fine.
> >
> >On Thu, Aug 6, 2009 at 4:00 PM, Jason
> >Proctor<[email protected]> wrote:
> >>
> >>  is it true that AsyncTasks can only be executed once? IMHO they
> >>  should be reusable, one-use classes just give the GC more of a job.
> >>
> >>  --
> >>  jason.software.particle
> >>
> >  > >
> >>
>
>
> --
> jason.software.particle
>
> >
>


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