android - Storing complex object graphs in Parcelable? -



android - Storing complex object graphs in Parcelable? -

existing parcelable examples rather trivial. if have complex object graph next questions arise questioning feasibility:

is there way prevent object beingness written multiple time parcel? are there best practices limit depth of object graph while writing?

to give illustration first question, object references b, in turn references a. cycle leads writes a, b, a, b, a, ... until stackoverflowerror because there not seem way reference object written.

for sec question let's have long graph a->b->c->d->e, , want serialize additional depth of 2, a->b->c. did writing custom writetoparceldeep method, of course of study not convenient standard writetoparcel.

java serialization preserve reference , write object once. current devices much more powerful ones past , i'm not sure performance gain justifying writing parcelable biolerplate code complicated 1 in example.

i'll maintain using serializable , can read more findings on topic here.

android parcelable

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -