Skip to content

Technical Details

mdsimmo edited this page Jun 30, 2018 · 3 revisions

How does the circular reference resolving works internally?

How it works is it uses JNI to allocate a reference to an object without actually constructing the object. Then, if the object being constructed needs, say, a reference to its self to be constructed, then the allocated object can be passed to itself in its constructor.

The relevant code is in com.github.texxel.data.serializers.ObjectCreator

Clone this wiki locally