I'm trying to save my section in my piece, but I worry that I'm leaking my activity I am Here's what I'm doing:
@ Override public view crate view (LayoutEfterter Inflator, View Group Container, Bundle State) {if (mView! = Null) {see oldParent = mView.getParent ( ); If (old bankruptcy! = Container) {((Group View Old Guardian) .removeView (mView); } Return mView; } And {mView = inflater.inflate (R.id.fragview, zero) returns mView; }} I'm worried because I know that all the scenes are holding in any context and I do not know whether this is the reference context or application reference that is flown by the flyer. Perhaps it is a good idea to create a visual view and set its properties using getActivity (). Instead of using Flower, getApplication () I appreciate any feedback on this.
Thank you!
Edit: Confirmed activity leak, although this code does not work great: * (
I am trying to save my section in my piece, but I worry that I am leaking my activity.
All configurations To maintain "view states" in the changes, use onSaveInstanceState () (in section) and onRetainConfigurationInstance () (in action) I I'm not sure whether you are mentioning other "view states". I'm worried because I know that all the ideas hold in one context and I do not know that Activity is reference or application reference if inflater is inflated.
Using the application to look at inflation does not work well, You activity and, therefore, , Thoughts will keep a reference for activity that inflates them.
Comments
Post a Comment