From c973305b6d441ad5cb22642a52f9a1aa15ad06b4 Mon Sep 17 00:00:00 2001 From: Sander Schobers Date: Tue, 12 Mar 2019 19:23:47 +0100 Subject: [PATCH] Cleanup of (font) resources on destroy. --- ui/allg5ui/renderer.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/allg5ui/renderer.go b/ui/allg5ui/renderer.go index dbc657b..34ddbef 100644 --- a/ui/allg5ui/renderer.go +++ b/ui/allg5ui/renderer.go @@ -98,6 +98,10 @@ func (r *Renderer) Refresh() { func (r *Renderer) Destroy() error { r.user.Destroy() r.eq.Destroy() + for _, f := range r.ft { + f.Destroy() + } + r.ft = nil r.disp.Destroy() return nil }