Hi Team,

In protobuf-net if an instance of class A is referenced in two other 
instances of class B and C.
Does after de-serialization  B and C reference to a single instance A or 
two different instances of A with the same content?

For example:

*Pseudo code:*

[protocontract]
class A;

[protocontract]
class B
{
   A a;
}

[protocontract]
class C
{
   A a;
}

[protocontract]
class D
{
 B b;
 C c;
}

main()
{

A ref = new A();
B b = new B();
C c = new C();
D d = new D();

b.a= ref;
c.a= ref;
d.b = b;
d.c = c;

protobuf.Serialize(d);
D obj = protobuf.Deserialize(d);

}

After de-serialization D::A::a & D::B::a will be refer to* same object* OR 
*different 
objects with same content?*

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to