[922] in Zephyr_Bugs
No subject found in mail header
daemon@ATHENA.MIT.EDU (Jeff Evarts)
Mon Mar 30 13:02:43 1998
From: jde@va.pubnix.com (Jeff Evarts)
Date: Mon, 30 Mar 1998 13:02:32 -0500 (EST)
To: ghudson@MIT.EDU, bug-zephyr@MIT.EDU, jde@va.pubnix.com
Gregory Stark writes:
> Greg Hudson <ghudson@MIT.EDU> writes:
> > > 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.
>
> Marc once proposed a simple solution that would accomplish a lot. Whenever
> zwgc has no windows mapped, free all the colours it has allocated.
>
> This would solve the most annoying (arguably a denial of service attack)
> situation where someone sends you a zephyr containing a large number of
> zephyrs.
>
> greg
This sounds like the right idea to me... is it easy to detect
when the count of exposed windows goes to zero?
-Jeff