Skip to content

move shared context to shared_ptr #12

Open
AlexDovgan wants to merge 2 commits into
CBaquero:masterfrom
AlexDovgan:master
Open

move shared context to shared_ptr #12
AlexDovgan wants to merge 2 commits into
CBaquero:masterfrom
AlexDovgan:master

Conversation

@AlexDovgan

Copy link
Copy Markdown

Using C++ references for access to shared context did not implemented correctly. For correct work, the CRDT objects should not support copy semantic, just a move semantic should be supported. In current implementation on debug build in VS we get an exception, cause compiler not implement copy elision optimization, the copy constructor is calling when delta is creating and returning so code is crashing. For correct copy semantics supporting I implemented context as the std::shared_ptr.

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

Successfully merging this pull request may close these issues.

1 participant