Wednesday, 7 December 2016

Android static object lifecycle

I am creating event search application, we set search criteria from one screen populate in another screen then user can edit search criteria from 3rd screen and goes to 4th screen.
To achieve above task i am using static object which remember the values around the application and i don't need to do any thing extra.
But i am afraid if about static object life cycle in android if low memory found android delete static objects ???
As android supports multi tasking, if user switches to another application and when user comes back application start acting crazy, does static object get removed when it multi task ??? any idea ?? and also suggest holding static object via singleton method is better approach ???

No comments:

Post a Comment