mirror of
https://github.com/gnustep/libs-back.git
synced 2025-05-31 01:11:00 +00:00
Added [XGScreenContext dealloc] to clean up RContext.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@17238 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
78cf5ccc03
commit
af2959566f
1 changed files with 25 additions and 0 deletions
|
@ -254,6 +254,31 @@ _parse_display_name(NSString *name, int *dn, int *sn)
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) dealloc
|
||||||
|
{
|
||||||
|
// FIXME: context.c does not include a clean up function for Rcontext,
|
||||||
|
// so we try do it here.
|
||||||
|
if (rcontext)
|
||||||
|
{
|
||||||
|
XFreeGC(rcontext->dpy, rcontext->copy_gc);
|
||||||
|
if (rcontext->drawable)
|
||||||
|
{
|
||||||
|
XDestroyWindow(rcontext->dpy, rcontext->drawable);
|
||||||
|
}
|
||||||
|
if (rcontext->pixels)
|
||||||
|
{
|
||||||
|
free(rcontext->pixels);
|
||||||
|
}
|
||||||
|
if (rcontext->colors)
|
||||||
|
{
|
||||||
|
free(rcontext->colors);
|
||||||
|
}
|
||||||
|
free(rcontext->attribs);
|
||||||
|
free(rcontext);
|
||||||
|
}
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
- (XGDrawMechanism) drawMechanism
|
- (XGDrawMechanism) drawMechanism
|
||||||
{
|
{
|
||||||
return drawMechanism;
|
return drawMechanism;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue