mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-22 15:31:14 +00:00
Fix memory leak for XFT drawing. Bug #13705.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@23000 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c6bf40df52
commit
3784cdcd22
2 changed files with 21 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2006-05-29 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/xlib/XGGState.m (-dealloc, -deepen):
|
||||
Free XFT drawing structures and don't reuse the same ones for
|
||||
copies of the gstate. Fixes bug #13705.
|
||||
|
||||
2006-05-29 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/xlib/GSXftFontInfo.m (FcFontEnumerator
|
||||
|
|
|
@ -125,6 +125,17 @@ static Region emptyRegion;
|
|||
XFreeGC(XDPY, agcntxt);
|
||||
if (clipregion)
|
||||
XDestroyRegion(clipregion);
|
||||
|
||||
#ifdef HAVE_XFT
|
||||
if (xft_draw != NULL)
|
||||
{
|
||||
XftDrawDestroy(xft_draw);
|
||||
}
|
||||
if (xft_alpha_draw != NULL)
|
||||
{
|
||||
XftDrawDestroy(xft_alpha_draw);
|
||||
}
|
||||
#endif
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
@ -148,6 +159,10 @@ static Region emptyRegion;
|
|||
self->clipregion = region;
|
||||
}
|
||||
|
||||
#ifdef HAVE_XFT
|
||||
xft_draw = NULL;
|
||||
xft_alpha_draw = NULL;
|
||||
#endif
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue