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.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cda33fc7f63c2885 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-07 14:51:39 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!out.nntp.be!propagator-SanJose!in.nntp.be!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: Subject: Re: list strawman Message-ID: X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Mon, 07 Jan 2002 17:51:31 EST Organization: http://www.newsranger.com Date: Mon, 07 Jan 2002 22:51:31 GMT Xref: archiver1.google.com comp.lang.ada:18628 Date: 2002-01-07T22:51:31+00:00 List-Id: In article , Stephen Leake says... > >Ted Dennison writes: > >> If you could move the tagged-ness to the private section, I'd prefer >I agree, but I needed the 'Class in functions returning Iterator to >avoid dispatching on two types. If I use 'Class in the public part, >the type has to be _publicly_ tagged. > >An alternate solution is to wrap the Controlled iterator type in a >record, so that the public Iterator type is not itself tagged. That's precisely what I did. The iterator is not tagged, but is a record with one field whose type is derived from Controlled. >You're right; I'm not doing this right. I think it is easy to fix; in >Finalize (List), loop thru the Iterator_list, and call >Invalidate_Iterator. Apparently I meant to do that, because I declared >the subprogram Invalidate_Iterator, but I never call it :). Right. That's the way it looked to me too. >Yes, that is a good design policy. But currently, in Initialize >(Iterator), I add the iterator to the List's Iterator_List. So that >doesn't get done in some cases. I need to change this. Ahhh, so I see. Which list are you talking about though? The user has never specified a list at this point, and Object.IA.List (which you dereference) is probably going to be null (not to mention Object.IA itself). >> I actually have been checking for leaks too, with some code internal >> to the package. I essentially increment an alloction counter at > >Yes, but my Test_Storage_Pools does the same thing, without modifying >the source; it's a generic parameter (the storage_pool). That makes it >easier to take out in a release. And you don't have to worry about >forgetting a "new". I may look into that, if its something that can easily be fit into a dumb test case. The way I have it in there now is good to prove that there are no leaks to someone who is interested, but its a bit of a hack and clutters up the code quite a bit. --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced.