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

What is the usage of a cbor_item_t with zero reference count? #65

Open
khabinov opened this issue Dec 7, 2017 · 0 comments
Open

What is the usage of a cbor_item_t with zero reference count? #65

khabinov opened this issue Dec 7, 2017 · 0 comments

Comments

@khabinov
Copy link

khabinov commented Dec 7, 2017

Hi, first of all, thanks for this great library.

It looks that both cbor_decref and cbor_move decrement number of references, however, when refcount reaches zero, cbor_decref will destroy an object. It seems that it is possible to make refcount equal to zero by using cbor_move, so I was wondering how a cbor_item_t with zero reference count could be used apart from moving it's content into cbor map or cbor array?

Thanks!

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