Skip to content
Discussion options

You must be logged in to vote

This function takes an owned instance of some data (maybe a Vec<u8>) and it will be dropped once complete, so there isn't a leak so much as failure to return it once complete, as you point out. It's certainly possible change this to do what you ask, maybe by also passing a callback which receives the data or function which returns it using a handle or ID. In practice this usually isn't a bottleneck and short-lived allocations are fine, but you also might pass a wrapper type which internally implements AsRef<u8> using a borrow of Arc<..> or something.

However, this is a very special function in Vulkan because:

dataSize must be less than or equal to 65536 bytes. For larger updates, applica…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@remifontan
Comment options

Answer selected by remifontan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants