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

no option to load image from memory with non static live time #2167

Closed
2 tasks done
LuckyTurtleDev opened this issue Dec 13, 2023 · 2 comments
Closed
2 tasks done

no option to load image from memory with non static live time #2167

LuckyTurtleDev opened this issue Dec 13, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@LuckyTurtleDev
Copy link

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

Because of #2166 I have try to impl my one caching to load images to the memory first, before I using them. But I notify that the form_memory needs static live time. I would if it would be possible to use at least something like Arc here?

What is the expected behavior?

non static param

Version

crates.io release

Operating System

Linux

Do you have any log output?

No response

@LuckyTurtleDev LuckyTurtleDev added the bug Something isn't working label Dec 13, 2023
@hecrj
Copy link
Member

hecrj commented Dec 13, 2023

It should be possible after #1551.

I recommend you to cache handles directly and cloning those in view.

@hecrj hecrj closed this as completed Dec 13, 2023
@LuckyTurtleDev
Copy link
Author

Thanks for the fast answer. Apparently I have mistake static type and static live time.
Since Handle use Arc intern it should be cheap to clone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants