Typically in java, objects are passed by the value of their reference. So if I have object OBJ
at address addr
then the object is passed by the value of the address addr
. But recently I read on Stack Overflow (How can I pass a Bitmap object from one activity to another) that passing a bitmap through intent is expensive. Here is the partial quote:
If the bitmap exists as a file or a resource, its is always better to pass the URI or ResourceID of the bitmap and not the bitmap itself. Passing the entire bitmap requires a lot of memory.
So why is the bitmap object not being passed around by the value of its reference?