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

Add drop method to wgpu objects #100

Closed
wants to merge 1 commit into from
Closed

Conversation

Ldash4
Copy link

@Ldash4 Ldash4 commented Sep 2, 2021

It was suggested that I make this PR here: gfx-rs/wgpu-native#128

Copy link
Collaborator

@kvark kvark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!
I'm open to a different naming scheme, if anybody has ideas :)

@Kangz
Copy link
Collaborator

Kangz commented Sep 2, 2021

This is mostly a duplicate of #94

I don't think we should merge it before we agree on lifetime management between implementations. We feel strongly that refcounting is needed for many objects, and wgpu can support that with no cost. drop doesn't have that semantic.

@kvark
Copy link
Collaborator

kvark commented Sep 2, 2021

@Kangz this is not a duplicate. It's exactly half of #94 (unref but not the addref). What's most important, it's the half that we do agree on. So I see no reason to block this from merging.

@Kangz
Copy link
Collaborator

Kangz commented Sep 2, 2021

The name changes the semantic significantly. And I find the push to just get stuff landed quite frustrating given we've waited a whole 3 years for wgpu to figure out their lifetime semantics.

@kvark
Copy link
Collaborator

kvark commented Sep 2, 2021

I don't think the 3 years mark is relevant here. I understand the frustration, but the 3 year discussion was about stuff we couldn't agree on. And here we are talking about something we actually do agree on. If you suggested this 3 years ago, we'd happily merge!
Let's bikeshed the name then. Would you consider anything other than "Release" here, or are you strongly attached to this?

@kainino0x
Copy link
Collaborator

Closing in favor of #15

@kainino0x kainino0x closed this May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifetimes Lifetimes of object and memory allocations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants