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

Lifetimes for Structures exceed their Builder's lifetime #902

Closed
BitSyndicate1 opened this issue Apr 1, 2024 · 2 comments
Closed

Lifetimes for Structures exceed their Builder's lifetime #902

BitSyndicate1 opened this issue Apr 1, 2024 · 2 comments

Comments

@BitSyndicate1
Copy link

When passing in a reference to an array in a builder for example for the RenderPassCreateInfoBuilder like this:

        let create_info = ash::vk::RenderPassCreateInfo::builder()
            .attachments(&[color_attachment])
            .subpasses(&[sub_pass])
            .dependencies(&[dependency])
            .build();

After the create_info is build, The slices can be preemptively freed.

Fix suggestion: Introduce a PhantomData with the lifetime of the Builder in such cases.

@Friz64
Copy link
Contributor

Friz64 commented Apr 1, 2024

Please see #866. A fix for this will be released in the new release, which is due very soon.

@Ralith Ralith closed this as not planned Won't fix, can't repro, duplicate, stale Apr 1, 2024
@MarijnS95
Copy link
Collaborator

MarijnS95 commented Apr 1, 2024

Duplicate of #223, #441, #602, #866 (and likely a bunch more).

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

4 participants