How to use onSaveInstanceState with a lot of data and objects
<p>When my application became sophisticated and main activity started holding in memory a lot of data (loaded and parsed from files in response to user actions) I have (mistakenly) switched from <code>onSaveInstanceState</code> to <code>onRetainNonConfigurationInstance</code> without noticing that <code>onRetainNonConfigurationInstance</code> is not called when application is killed to save device memory. So as now I has to switch back to <code>onSaveInstanceState</code> I want to as what is the proper way to handle a huge amount of data distributed by tens of objects? Do I have to implement serialization for all these objects (<code>Parcelable</code>?) or may be put all the data into <code>Service</code> thread hoping it would not be killed? What is the best practice?</p>
