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

Use a &'static str inside of Window::name #11718

Closed
alice-i-cecile opened this issue Feb 5, 2024 · 3 comments
Closed

Use a &'static str inside of Window::name #11718

alice-i-cecile opened this issue Feb 5, 2024 · 3 comments
Labels
A-Windowing Platform-agnostic interface layer to run your app in C-Code-Quality A section of code that is hard to understand or change D-Trivial Nice and easy! A great choice to get started with Bevy

Comments

@alice-i-cecile
Copy link
Member

          Could this be a &'static str instead? Given that it's not supposed to be changed?

Originally posted by @atornity in #7650 (comment)

@alice-i-cecile alice-i-cecile added D-Trivial Nice and easy! A great choice to get started with Bevy A-Windowing Platform-agnostic interface layer to run your app in C-Code-Quality A section of code that is hard to understand or change labels Feb 5, 2024
@SludgePhD
Copy link
Contributor

Wouldn't that make it impossible to compute/format the window name during creation without leaking memory?

@alice-i-cecile
Copy link
Member Author

Yeah, fair point. Closing this out.

@alice-i-cecile alice-i-cecile closed this as not planned Won't fix, can't repro, duplicate, stale Feb 5, 2024
@ManevilleF
Copy link
Contributor

Would a Cow<&'static str> work then ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Windowing Platform-agnostic interface layer to run your app in C-Code-Quality A section of code that is hard to understand or change D-Trivial Nice and easy! A great choice to get started with Bevy
Projects
None yet
Development

No branches or pull requests

3 participants