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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5d38b71c771be34e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-12 17:52:35 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn4feed!wn1feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!sccrnsc03.POSTED!not-for-mail From: Caffeine Junky Subject: Re: Unchecked Deallocation? Newsgroups: comp.lang.ada References: <_YIX8.483917$352.79617@sccrnsc02> User-Agent: Pan/0.11.3 (Unix) Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Comment-To: "Robert A Duff" Message-ID: NNTP-Posting-Host: 12.245.48.122 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc03 1026521554 12.245.48.122 (Sat, 13 Jul 2002 00:52:34 GMT) NNTP-Posting-Date: Sat, 13 Jul 2002 00:52:34 GMT Organization: AT&T Broadband Date: Sat, 13 Jul 2002 00:52:34 GMT Xref: archiver1.google.com comp.lang.ada:27036 Date: 2002-07-13T00:52:34+00:00 List-Id: On Fri, 12 Jul 2002 19:12:50 -0400, Robert A Duff wrote: > Caffeine Junky writes: > >> function Clear_Stack(S : in Stack) return Boolean; > > You want a procedure, here, with an 'in out' parameter. Not a function. > You need to recursively free the whole list. Your instantiation of > Unchecked_Deallocation is correct. > >> return True; -- No reason for it not to return True in this -- >> -- instance, as far as I can tell. -- > > Right, which is why you don't want a function. > > - Bob I get it! I really actually GET IT! For a change. And it works. I seem to have an affinity for functions, and I dont know why. Any rules of thumb on when it's a good idea to (use/not use) functions and procedures in Ada95? I'm also checking out Mr. Botton's example on 'Garbage Collection' over at the Adapower website. Seems that taking that route might be simpler in some regards. Any good Ada references on memory managment you can point me to? Thanks. St4pL3