Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!snorkelwacker.mit.edu!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse From: mouse@LARRY.MCRCIM.MCGILL.EDU Newsgroups: comp.windows.x Subject: Re: Need opinions re: BadAlloc Message-ID: <9012220228.AA10299@Larry.McRCIM.McGill.EDU> Date: 22 Dec 90 02:28:22 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 26 > I'm now writing the code which sets the various properties > WM_COMMAND, WM_CLIENT_MACHINE, etc. required by the ICCCM. I doubt a > failure to intern these atoms is likely, but am not at all sure how > to procede if trying to write to them produces a BadAlloc. I would not fault an application for simply dying if that happens. Besides, if the server can't even intern an atom, it is probably going to be failing right and left when you try to create the rest of your window tree, pixmaps, and whatnot. > A related question is: How likely are these errors to occur? I wouldn't even consider the possibility. I'd just let the default error handler deal with the situation. A server that short of memory is pretty nearly useless anyway. > And again, if I get a BadAlloc, what would have to happern for a > later call to XChangeProperty to succeed? Something would have to free up some memory in the server...for example, shutting down an application or two should do it. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu