On Mar 27, 8:28 am, Raja Nagendra Kumar <[EMAIL PROTECTED]> wrote: > Is this not very close to how O.S manage the memory swapping to > database..
Uh... not sure I understand. There isn't really swapping to the database, SQLite just opens a file and commits changes to it as you perform transactions on it. Also, you can't put arbitrary objects into the database, for the same kinds of reasons -- you need some way to turn the in-memory representation of an objected into a flattened byte stream. > Pass by reference could always have another layer and this layer would > either get the object from persitance state or from memory if the > object is alive already. But you still need to -put- it into persistent state. > > - If you save the object the other activity still needs to be able to > > access that object > If the reference is beeing used by other activity, kill only the > activity and not the objects which are beeing referenced by other > activities, the way gc works You can't "kill only the activity"!!! We are killing -processes-. All of the activities in your application (as well as all of its other code) are running in the same process. Once that process is killed, everything in it goes away. > O.S has decided to killing the activity to release the resources and > more is available for other foreground activities. However, when we do > duplicate the same objects using parceble, we many not save any thing > by killing the activities in background.. Insted I say only kill the > objects which are not referenced, so that duplicating could be > avoided. Well you can't do that. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

