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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bae7ef2665942955 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-13 03:37:13 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsmi-us.news.garr.it!NewsITBone-GARR!news.mailgate.org!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: containers and garbage collections. Date: Sat, 13 Sep 2003 11:37:28 +0200 Organization: AdaCL Message-ID: <4397327.CqdvVbT517@linux1.krischik.com> References: <2458809.CYNMQ0Kujp@linux1.krischik.com> Reply-To: krischik@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1063449256 07 16919 ceamVHrEbyYZXC 030913 10:34:16 X-Complaints-To: usenet-abuse@t-online.de X-ID: EwvS1rZAZe3PknPSp7LyNnqEKcc9fg+9jxIbKhwU+cBN4rpKjvbGYa User-Agent: KNode/0.7.2 Xref: archiver1.google.com comp.lang.ada:42439 Date: 2003-09-13T11:37:28+02:00 List-Id: Stephen Leake wrote: > Martin Krischik writes: > Do either of your containers rely on the garbage collected storage > pool? No, AdaCL rely on the garbage collected storage only at two places: The Text Search and Replace Queues will leak less 16 bytes per File processed when garbage collection is off. The extended booch components will not leak memory when garbage collection has been switched off. At least to my knowlege. >> Both can't be done with C++ templates - so we should not take the >> all mighty STL as an example. > Hmm. I haven't really looked, but I'd be very surprised if an STL > container can't contain STL Strings. Ahh, Yes. but STL strings are like Unbounded_Strings. I was speaking of fixed strings like char []. Support for open arrays is not the teriffic in C++. > Of course, there is no such thing as "indefinite abstract tagged > private" in C++. The closest thing is a class with only pure virtual > member functions; that leaves out the "indefinite" part (implied by > the (<>)). So to say "STL" can't do that isn't saying much; you're > really just saying "C++ can't do that". No, you misunderstood. In Ada you can say: Y: Child_of_Some_Abscract; X : Some_Abscract_Access := new Some_Abscract'(Child_of_Some_Abscract); and X will point to a copy of Y. In C++ you will need some form of cloning facility. > I'm not clear what you mean by "don't take the STL as an example". > Clearly the STL is limited by the expressiveness of C++; Ada is > better. But the STL has proven to be a very useful library, because of > the functionality it provides; it is reasonable to design an Ada > library that has similar functionality, but takes full advantage of > Ada to do it. I think that is your real goal? Yes, I agree on that. Prehaps I did not make myself clear enough. With Regards Martin -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com