Hi,

I was wondering about the behavior of Bundles and serializable
objects. If I put a serializable object into a bundle, what is
serialized then, the reference to the object or the object itself?

I always assumed that the object itself would be serialized to a byte
stream when calling putExtra() and re-created from that representation
when calling getSerializableExtra(), but I recently stumbled upon a
piece of code that put an entire view into a Bundle in thread A,
retrieved it from that bundle in thread B, performed a modification on
it and this modification actually became visible. This can only happen
if the reference to that view was stored, not the view itself, right?
Otherwise, the modification had been applied to a copy of that view
and would be meaningless.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to