The returned objects are owned by GpFontCollection and the font collection is responsible for their lifetime. The managed implementation of System.Drawing in Mono and System.Drawing.Common in .NET Core already treated the ownership correctly which resulted in memory leaks. Change GdipDeleteFontFamily to detect accidental attempts to delete the font family objects.
The returned objects are owned by GpFontCollection and the font collection is responsible for their lifetime. The managed implementation of System.Drawing in Mono and System.Drawing.Common in .NET Core already treated the ownership correctly which resulted in memory leaks. Change GdipDeleteFontFamily to detect accidental attempts to delete the font family objects.