From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,56131a5c3acc678e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-27 22:39:49 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Question about OO programming in Ada Date: 28 Nov 2003 06:37:18 +0000 Organization: Pushface Sender: simon@smaug.pushface.org Message-ID: References: NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1070001588 18768 62.49.19.209 (28 Nov 2003 06:39:48 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Fri, 28 Nov 2003 06:39:48 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Xref: archiver1.google.com comp.lang.ada:3010 Date: 2003-11-28T06:37:18+00:00 List-Id: "Robert I. Eachus" writes: > subtle memory leaks. (The usual problem cases are when an exception > occurs during the creation or freeing of a data structure.) I'm not at all sure that the Booch Components at (http://www.pushface.org/components/bc) are safe against this sort of thing -- that is, against running out of memory while adding an element to a container. If that is going to be a problem, I would expect people to be using the bounded forms, which don't allocate memory (of course, the element may be a controlled type with internal memory management). I would have thought that a system where an exception occurs in manipulating data structures is almost bound to be inconsistent and needs restarting as soon as possible. Of course if the battle override switch is on you will carry on as best you can, but you are definitely at risk. I doubt you can fix this "merely" by making the containers exception-safe. No real help having a consistent list if the data in it is inconsistent! (but always nice to avoid walking off the end of a list, of course). -- Simon Wright 100% Ada, no bugs.