From 85d25cf17786ac722890839b01eda6ea91b9f99a Mon Sep 17 00:00:00 2001 From: Peter Tang Date: Tue, 12 Sep 2023 09:38:11 +0800 Subject: [PATCH] clean up array contents within BundleManager. --- Sources/SwiftMath/MathBundle/MathFont.swift | 1 + 1 file changed, 1 insertion(+) 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