[920] in Zephyr_Bugs

home help back first fref pref prev next nref lref last post

Re: zwgc: Error in XAllocColor

daemon@ATHENA.MIT.EDU (Greg Hudson)
Sat Mar 28 10:35:56 1998

Date: Sat, 28 Mar 1998 10:35:51 -0500
From: Greg Hudson <ghudson@MIT.EDU>
To: Jeff Evarts <jde@va.pubnix.com>
Cc: ghudson@MIT.EDU, bug-zephyr@MIT.EDU
In-Reply-To: "[919] in Zephyr_Bugs"

> it seems like we could keep all the colors in a list, then empty the
> list when the window-painting routine is complete.

My understanding is that you must keep the color allocated as long as
you're using it in a drawable.  (It certainly wouldn't make sense that
you could deallocate a color you have drawn; otherwise you could
easily get more than 256 colors on an 8-bit display.)

So if we draw windowgram 1 and then draw windowgram 2, when windowgram
2 goes away we can't free all of its colors or we might free colors
which are still being displayed in windowgram 1.

home help back first fref pref prev next nref lref last post