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,a46843ba8cee64d2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-09-19 12:07:04 PST From: "Anisimkov" Newsgroups: comp.lang.ada Subject: Re: dinamic object reclamation Date: Thu, 20 Sep 2001 01:21:07 +0600 Organization: A poorly-installed InterNetNews site Distribution: world Message-ID: <9oangi$dp8$1@ns.omskelecom.ru> References: <9oa69d$6ej$1@ns.omskelecom.ru> <9oahqo$3on$1@ns.omskelecom.ru> NNTP-Posting-Host: 195.162.36.156 X-Trace: ns.omskelecom.ru 1000923475 14120 195.162.36.156 (19 Sep 2001 18:17:55 GMT) X-Complaints-To: usenet@ns.omskelecom.ru NNTP-Posting-Date: Wed, 19 Sep 2001 18:17:55 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeed.gamma.ru!Gamma.RU!news2.aha.ru!news.rosprint.net!radius!not-for-mail Xref: archiver1.google.com comp.lang.ada:13184 Date: 2001-09-20T01:21:07+06:00 List-Id: > >But there is more then limit of memory usage > >becouse I wrote > > for Block_Ptr'Storage_Size use Integer'Last; > >inside of procedure "act". > > > >and memory is not leaking now. > > >It looks like a trick. > > Well, it is. But it is clearly one that was placed into the language on purpose. > :-) The one reasonable explanation i can imagine is that when we declearing for Block_Ptr'Storage_Size use Integer'Last; GNAT creates storage_pool locally in the "act" procedure. and when we are leaving this procedure storage pool Finalized. Could be nice to have standard way to declate access type with a local storage pool. If the Ada.Unchecked_Deallocation is Unchecked what deallocation is "Checked" ?