From 8be08ea497235d35654a9a90f1ce25a215e60738 Mon Sep 17 00:00:00 2001 From: Wizzup? Date: Mon, 28 Dec 2009 19:34:07 +0000 Subject: [PATCH] Memory leak fix git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@351 3f818213-9676-44b0-a9b4-5e4c4e03d09d --- Units/MMLCore/fontloader.pas | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Units/MMLCore/fontloader.pas b/Units/MMLCore/fontloader.pas index 9cc9e58..f1a2c09 100644 --- a/Units/MMLCore/fontloader.pas +++ b/Units/MMLCore/fontloader.pas @@ -135,7 +135,11 @@ begin end; destructor TMFonts.Destroy; +var + i:integer; begin + for i := 0 to Fonts.Count - 1 do + TMFont(Fonts.Items[i]).Free; Fonts.Free; inherited; @@ -177,6 +181,7 @@ var i: integer; begin i := GetFontIndex(Name); + TMFont(Fonts.Items[i]).Free; Fonts.Delete(i); end;