What is "activity record object" in Android? -
i referring following article further understand life cycle of activity , found phrase "activity record object"
quoting article :
when activity stashed, activity object not exist, the activity record object lives on in os.the os can reanimate activity using the activity record when needs to.
when onsaveinstancestate(...) called, data saved bundle object.that bundle object stuffed activity's activity record os
could 1 define meant "activity record object", , os save considerable amount of memory killing activity ?
i wrote passage quote here (it's book brian hardy , wrote, android programming: big nerd ranch guide). let me see if can answer questions.
the "activity record object" (i "activity record") not visible application developer. instead, lives in android os, used keep track of activity. object saved instance state stored; it's intent started activity lives, activity results receive stored before delivered. more importantly, if activity record alive, may used reconstitute activity instance in application.
the activity record object cheaper keep alive instance of activity class. activity instance has whole view hierarchy, can take few megabytes of memory itself. on top of that, activity instances require app's process exist. if there no activity instances left, android can rid of entire process, too.
Comments
Post a Comment