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

Disallow serialize/deserialize smart pointers #15

Open
ddmbr opened this issue Feb 8, 2018 · 1 comment
Open

Disallow serialize/deserialize smart pointers #15

ddmbr opened this issue Feb 8, 2018 · 1 comment

Comments

@ddmbr
Copy link
Member

ddmbr commented Feb 8, 2018

Serialize/deserialize smart pointers does not make sense to me. std::unique_ptr is for a single copy of object, and so serializing/deserializing it violates this. std::shared_ptr will have wrong reference counting with serializing/deserializing.

It does not make sense in scenarios like checkpointing and recovery, since pointers won't point to the previous addresses any more.

@ddmbr ddmbr changed the title Disallow copying smart pointers Disallow serialize/deserialize smart pointers Feb 8, 2018
@ddmbr
Copy link
Member Author

ddmbr commented Feb 8, 2018

Just fixed my typo

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

1 participant