Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sdd.hp.com!elroy.jpl.nasa.gov!lll-winken!cert!netnews.upenn.edu!grip.cis.upenn.edu!bradley From: bradley@grip.cis.upenn.edu (John Bradley) Newsgroups: comp.windows.x Subject: XAllocColor/XFreeColors question Message-ID: <31383@netnews.upenn.edu> Date: 19 Oct 90 01:01:56 GMT Sender: news@netnews.upenn.edu Reply-To: bradley@grip.cis.upenn.edu (John Bradley) Distribution: na Organization: University of Pennsylvania Lines: 19 Situation: I allocate two read-only color cells. Because the colors were exactly the same, (or because the colors were different, but the *displayable* colors were the same (happens all the time on machines with 4-bit RGB D/As)), I've actually allocated the same color cell twice. In and of itself, not a problem. However, when I want to free the color cells, I have a bit of a problem. On certain MIT X11R4 servers, I've seen that color cells are not released unless they are freed the same number of times that they were allocated, even if the multiple allocations were all from one client. This seems like perfectly reasonable behavior, and I can live with it. Unfortunately, OTHER X servers (IBM 6000/AIX 3.1, and others) get all bent- out-of-shape if I try to free the same color cell more than once. Question: Which behavior is 'correct'? The Xlib manual doesn't really seem to say what should happen. --jhb