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-Thread: 103376,ec2a500cce3658c4 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit From: Brian May Newsgroups: comp.lang.ada Subject: Re: Memory leak - What the ...? References: Date: Mon, 18 Oct 2004 10:33:16 +1000 Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:COARQ6NRf5kl/d5ygpTRjIs1Fnc= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: dsl-202-173-153-89.vic.westnet.com.au X-Trace: news.melbourne.pipenetworks.com 1098059582 202.173.153.89 (18 Oct 2004 10:33:02 +1000) X-Complaints-To: abuse@pipenetworks.com X-Abuse-Info: Please forward all headers to enable your complaint to be properly processed. Path: g2news1.google.com!news2.google.com!news.maxwell.syr.edu!news-north.connect.com.au!news.alphalink.com.au!news.melbourne.pipenetworks.com!not-for-mail Xref: g2news1.google.com comp.lang.ada:5381 Date: 2004-10-18T10:33:16+10:00 List-Id: >>>>> "Jean-Pierre" == Jean-Pierre Rosen writes: Jean-Pierre> The magic formula is: Jean-Pierre> Number_Of_Finalize = Number_Of_Initialize + Number_Of_Adjust + Jean-Pierre> Number_Of_Aggregates Jean-Pierre> Remember that aggregates are objects which have no Jean-Pierre> initialize (they are supposed to be created Jean-Pierre> correctly). They are finalized, though. So in this code: (Create)(Adjust)(Finalize)(Finalize)(Adjust)(Finalize)Deleting... (Finalize)(Adjust)Debug Pool info: Total allocated bytes : 36 Total deallocated bytes : 36 Current Water Mark: 0 High Water Mark: 24 (Finalize)(Finalize) If my counting is correct: 1 Create. 3 Adjust. 6 Finalize. Or 1 + 3 + Number_Of_Aggregates = 6 Or Number_Of_Aggregates = 2 I am still confused as to why 2 objects would be created without either a Create or an Adjust. Ok, there is the initial value, before it is assigned. That makes 1. Not 2. I guess my confusion comes from the two finalize at the end. -- Brian May