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

Custom fonts use memory that is never freed #4908

Open
2 tasks done
andydotxyz opened this issue Jun 3, 2024 · 1 comment
Open
2 tasks done

Custom fonts use memory that is never freed #4908

andydotxyz opened this issue Jun 3, 2024 · 1 comment
Labels
bug Something isn't working optimization Tickets that could help Fyne apps run faster

Comments

@andydotxyz
Copy link
Member

Checklist

  • I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
  • This issue only relates to a single bug. I will open new issues for any other problems.

Describe the bug

Set a font on Text.FontSource to display some text. Then remove this text.
Memory is never cleared out of the font cache.

How to reproduce

As above

Screenshots

No response

Example code

	text1.FontSource, _ = fyne.LoadResourceFromPath("./WorkSans-Black.ttf")

Fyne version

v2.5.0-pre

Go compiler version

1.21

Operating system and version

all

Additional Information

No response

@andydotxyz andydotxyz added the unverified A bug that has been reported but not verified label Jun 3, 2024
@dweymouth dweymouth added optimization Tickets that could help Fyne apps run faster bug Something isn't working and removed unverified A bug that has been reported but not verified labels Jun 3, 2024
@dweymouth
Copy link
Contributor

Just adding a note that this applies to fonts automatically loaded by Fyne from the OS too - although in this case it is bounded since at most one per Unicode script per style is loaded. When a fix for this is implemented we should make sure it covers the auto-loaded OS fonts that have not been used in awhile too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working optimization Tickets that could help Fyne apps run faster
Projects
None yet
Development

No branches or pull requests

2 participants