[android-developers] Referencing views through instance fields and garbage collection
Correct me if I'm wrong - onStop state destroys view hierarchy of activity/fragment. Consequently, views that are referenced through the object fields will be retained because of hard references, for example if I have such a class:
public class ArticleFragment extends Fragment {
WebView mWebView;
The webview won't be destroyed.
Am I right in my assumptions ? Should I use weakreferences or findViewById ?
Thanks.
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