android - Memory retained by Fragment -
when call popbackstack
like:
manager.popbackstack("mybackstack", fragmentmanager.pop_back_stack_inclusive);
will memory retained fragments belongs "mybackstack" freed?
i have fragmentactivity
manages listfragment
. every time click on item, fragmentactivity
instantiates new fragment
shows information item clicked , shows dialogfragment
bitmap (that recycle when dialog dismissed). put android:configchanges="orientation"
in manifest , override onconfigurationchanged
necessary.
yes, memory retained fragments freed. documentation,
public static final int pop_back_stack_inclusive
flag popbackstack(string, int) , popbackstack(int, int): if set, , name or id of stack entry has been supplied, matching entries consumed until 1 doesn't match found or bottom of stack reached. otherwise, entries not including entry removed.
and,
public abstract void popbackstack (string name, int flags)
pop last fragment transition manager's fragment stack. if there nothing pop, false returned. function asynchronous -- enqueues request pop, action not performed until application returns event loop.
note, however, there no guarantee memory freed immediately.
Comments
Post a Comment