Home > Mobile >  Why android activity passed between object serialization
Why android activity passed between object serialization

Time:11-29

As title; Why android activity passed between object serialization

CodePudding user response:

Because the bundle only support the serialized data

CodePudding user response:

Because the Android dealing with Intent is copy Intent, if pass objects are not serializable, so just pass object references


Reference:
http://stackoverflow.com/questions/14917029/pass-object-reference-within-intent-without-implementing-serializable-or-parcela

CodePudding user response:

One thousand the interface remains on an interface reference, the last interface is not a memory leak

CodePudding user response:

Unlike ios, Java memory by GC, if can directly reference objects between the Activity, can cause a lot of memory leaks

CodePudding user response:

Activity has been with hard jump operation intent is to prevent memory leaks, if the new an Activity can also pass and think is terrible,

Intent required you must directly serialization, remove the relevant references,
  • Related