Closed GoogleCodeExporter closed 9 years ago
Hi Marco,
FieldSerializer is the default serializer used for most objects (see
Kryo#register(Class) and Kryo#getDefaultSerializer(Class)). It does not support
object references. Any objects in the graph more than once will be serialized
individually more than once. Circular references will cause a stack overflow.
If you would like to serialize object references in your object graph, register
your
classes using ReferenceFieldSerializer. Please see the javadocs for that class
for
notes about the additional overhead it introduces. You may override
Kryo#getDefaultSerializer(Class) as an easy way to use ReferenceFieldSerializer
for
all your classes without having to construct and pass in a new
ReferenceFieldSerializer each time you call Kryo#register.
You may be interested in the discussion thread that caused
ReferenceFieldSerializer
to be added to Kryo. The thread is on the discussion forum for KryoNet, a sister
project that does NIO-based TCP and UDP network communication:
http://groups.google.com/group/kryonet-users/browse_thread/thread/84235dbe943ada
71#e08daae3f56e2785
Original comment by nathan.s...@gmail.com
on 1 Mar 2010 at 8:26
Issue 41 has been merged into this issue.
Original comment by nathan.s...@gmail.com
on 8 Mar 2011 at 10:47
Original issue reported on code.google.com by
m.br...@gmx.de
on 1 Mar 2010 at 8:08