mono / libgdiplus

C-based implementation of the GDI+ API
http://www.mono-project.com/
MIT License
333 stars 171 forks source link

Keeping track of temporary files created by GdipPrivateAddMemoryFont #691

Open trungnt2910 opened 3 years ago

trungnt2910 commented 3 years ago

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.

dnfadmin commented 3 years ago

CLA assistant check
All CLA requirements met.