[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug report: use of Pixmaps
From: |
Marcus G. Daniels |
Subject: |
Re: Bug report: use of Pixmaps |
Date: |
06 Apr 1999 20:07:13 -0700 |
Ok, here's a fix for the Pixmap setRaster: memory leak.
Index: Pixmap.m
===================================================================
RCS file: /cvs/hive/Swarm/swarm/src/tkobjc/Pixmap.m,v
retrieving revision 1.22
diff -c -r1.22 Pixmap.m
*** Pixmap.m 1999/02/06 01:49:14 1.22
--- Pixmap.m 1999/04/07 02:45:18
***************
*** 248,253 ****
--- 248,257 ----
obj->directory = "./";
obj->filename = NULL;
obj->decorationsFlag = NO;
+ #ifndef _WIN32
+ obj->pixmap = 0;
+ obj->mask = 0;
+ #endif
return obj;
}
Index: internal.m
===================================================================
RCS file: /cvs/hive/Swarm/swarm/src/tkobjc/internal.m,v
retrieving revision 1.130
diff -c -r1.130 internal.m
*** internal.m 1999/03/22 02:00:08 1.130
--- internal.m 1999/04/07 02:45:18
***************
*** 1271,1276 ****
--- 1271,1281 ----
Window window = Tk_WindowId (tkwin);
Colormap *colormap = raster->colormap;
BOOL retryFlag = NO;
+
+ if (pixmap->pixmap)
+ XFreePixmap (pixmap->display, pixmap->pixmap);
+ if (pixmap->mask)
+ XFreePixmap (pixmap->display, pixmap->mask);
while (1)
{
***************
*** 1300,1305 ****
--- 1306,1312 ----
else
break;
}
+ pixmap->display = display;
}
#endif
}
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.