diff --git a/Sources/SwiftMath/MathBundle/MathFont.swift b/Sources/SwiftMath/MathBundle/MathFont.swift index 66d4c01..5e6d443 100644 --- a/Sources/SwiftMath/MathBundle/MathFont.swift +++ b/Sources/SwiftMath/MathBundle/MathFont.swift @@ -129,6 +129,7 @@ private class BundleManager { cgFonts.values.forEach { cgFont in CTFontManagerUnregisterGraphicsFont(cgFont, &errorRef) } + cgFonts.removeAll() } public enum FontError: Error { case invalidFontFile