Unless I've read this patch wrong, I think we should be changing the
XCreateGC's to XtCreateGC's, instead of the other way around.....


On 02-Aug-00 at 20:34, Steve Olson ([EMAIL PROTECTED]) wrote:
> Here's a fix for a memory leak.  GCs that are created with
> XCreateGC should be freed with XFreeGC.  I think there are
> similar issues in TextF.
> 
> *** lib/Xm/TextOut.c.orig       Wed May 24 19:08:54 2000
> --- lib/Xm/TextOut.c    Wed Aug  2 12:40:08 2000
> ***************
> *** 2300,2307 ****
>         Out_TimerId(o) = 0;
>       }
> 
> !     XtReleaseGC((Widget)w, Out_DrawGC(o));
> !     XtReleaseGC((Widget)w, Out_CursorGC(o));
>       XtReleaseGC((Widget)w, Out_CopyGC(o));
> 
>       if (Out_CursorIBeam(o))
> --- 2300,2307 ----
>         Out_TimerId(o) = 0;
>       }
> 
> !     XFreeGC(XtDisplay(w), Out_DrawGC(o));
> !     XFreeGC(XtDisplay(w), Out_CursorGC(o));
>       XtReleaseGC((Widget)w, Out_CopyGC(o));
> 
>       if (Out_CursorIBeam(o))
> 
> 
> 
> --== Sent via Deja.com http://www.deja.com/ ==--
> Before you buy.
> 
> 

Reply via email to