From c4e17538944000a6d1efb4fe16def352ea9f0e75 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Mon, 29 Aug 2011 12:12:04 +0200 Subject: richview: fixed another memory leak. --- docview/components/richtext/RichTextLayoutUnit.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docview/components/richtext/RichTextLayoutUnit.pas b/docview/components/richtext/RichTextLayoutUnit.pas index c44d14a6..606b7805 100644 --- a/docview/components/richtext/RichTextLayoutUnit.pas +++ b/docview/components/richtext/RichTextLayoutUnit.pas @@ -375,7 +375,8 @@ ProfileEvent('DEBUG: TRichTextLayout.Layout >>>>'); teTextEnd: begin DoLine( P, NextP, WordStartX + WordX ); - // end of text, done + // end of text, so it is safe to free CurrentLine created in DoLine() + CurrentLine.Free; break; end; -- cgit v1.2.3-70-g09d2