diff --git a/Sources/SwiftMath/MathRender/MTFont.swift b/Sources/SwiftMath/MathRender/MTFont.swift index afc1b5d..3dd3042 100644 --- a/Sources/SwiftMath/MathRender/MTFont.swift +++ b/Sources/SwiftMath/MathRender/MTFont.swift @@ -66,4 +66,9 @@ public class MTFont { /** The size of this font in points. */ public var fontSize:CGFloat { CTFontGetSize(self.ctFont) } + deinit { + self.ctFont = nil + self.defaultCGFont = nil + } + }