Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Keeping track of temporary files created by GdipPrivateAddMemoryFont #691

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

trungnt2910
Copy link

This should fix #690.

I've added a list of strings that should go along with the GpFontCollection, this list are the temporary files created by the GdipPrivateAddMemoryFont function.

When Dispose is called by C# code, GdipDeletePrivateFontCollection should go through the list and removes all temp files created.

There are ways to get files associated with an FcConfig, however, it will be hard to distinguish between files added using GdipPrivateAddMemoryFont or files managed by the user added through GdipPrivateAddFontFile, so I guess keeping a list of strings for later deletion is still a good solution.

… and clean them when the GpFontCollection is destoryed
@dnfadmin
Copy link

dnfadmin commented Feb 8, 2021

CLA assistant check
All CLA requirements met.

Base automatically changed from master to main March 12, 2021 13:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GdipPrivateAddMemoryFont does not clean up temporary files
2 participants