From cfd0976d6e2f35bb36182d7574845a2e1c2a2f1c Mon Sep 17 00:00:00 2001 From: lazarus Date: Sat, 9 Feb 2002 01:47:00 +0000 Subject: [PATCH] MG: freeing more unused GCs git-svn-id: trunk@834 - --- lcl/interfaces/gtk/gtkproc.inc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lcl/interfaces/gtk/gtkproc.inc b/lcl/interfaces/gtk/gtkproc.inc index ca1f1347a1..9de68a7b82 100644 --- a/lcl/interfaces/gtk/gtkproc.inc +++ b/lcl/interfaces/gtk/gtkproc.inc @@ -120,9 +120,11 @@ begin begin hWnd := SourceDC^.hWnd; Drawable := SourceDC^.Drawable; - if (SourceDC^.GC = nil) or (Drawable = nil) then - GC := nil - else begin + if GC<>nil then begin + gdk_gc_unref(GC); + GC:=nil; + end; + if (SourceDC^.GC <> nil) and (Drawable <> nil) then begin gdk_gc_get_values(SourceDC^.GC, @GCValues); //GC := gdk_gc_new(Drawable); GC := gdk_gc_new_with_values(Drawable, @GCValues, 3 { $3FF}); @@ -2427,6 +2429,9 @@ end; { ============================================================================= $Log$ + Revision 1.69 2002/08/22 07:30:16 lazarus + MG: freeing more unused GCs + Revision 1.68 2002/08/21 13:35:25 lazarus MG: accelerations for synedit