Re: [android-developers] Correct way to implement Activity onDestroy()?
On Tuesday, January 15, 2013 9:54:58 AM UTC-8, RichardC wrote:
Conciser holding a WeakReference to the Activity from the AsyncTask.
I would argue that this is a bad idea. If the AT is holding the reference so that it can report a result, then, if the reference is broken, the task will have spent battery computing a useless result. If you are willing to throw the result away, just cancel the task.
G. Blake Meike
Marakana
Programming Android 2ed is now in stores:
http://bit.ly/programmingandroid
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home