Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should Deserialization be clearing the cyclic reference manager as well? #162

Open
gjroelofs opened this issue Jun 25, 2020 · 2 comments
Open

Comments

@gjroelofs
Copy link

gjroelofs commented Jun 25, 2020

Within our project this has lead to contamination of the cyclic reference manager when deserializing and then re-serializing assets with the same Serializer.

Edit: The above line not calling _lazyReferenceWriter.Clear(); is presumably a bug, as is done in the serialization here:

@imerr
Copy link

imerr commented Aug 10, 2020

The code itself looks solid to me, are you using the same serializer from different threads? That might mess things up

@gjroelofs
Copy link
Author

Look at the corresponding code in Serialization:

This does a _lazyReferenceWriter.Clear(); if Exit() returns true.
I've already tested the fix and I'm quite sure that the Exit in deserialization should be clearing the refs as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants