Skip to content

Conversation

@DenisBiryukov91
Copy link
Contributor

add support for transferring data ownership to Bytes via custom deleter

@DenisBiryukov91 DenisBiryukov91 added the enhancement New feature or request label Dec 18, 2024
@YuanYuYuan
Copy link
Contributor

Nit: shall we align with the doc in zenoh-c? https://github.com/eclipse-zenoh/zenoh-c/blob/8974132e1bd49954ebf0a7b6242c8c3f8d21f503/include/zenoh_commons.h#L1480-L1482
In particular, the deleter has a guide for static variables.

@DenisBiryukov91
Copy link
Contributor Author

Nit: shall we align with the doc in zenoh-c? https://github.com/eclipse-zenoh/zenoh-c/blob/8974132e1bd49954ebf0a7b6242c8c3f8d21f503/include/zenoh_commons.h#L1480-L1482 In particular, the deleter has a guide for static variables.

I added to the docs, that deleter should be a thread safe. There is no need for extra mention for NULL, since Deleter can not be null here and should always a valid callable. It can have an empty implementation if user desires (it is way simpler to provide it in c++ than in c)

@milyin milyin merged commit f7f084e into eclipse-zenoh:main Dec 18, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants