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 Path: g2news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "Martin Dowie" Newsgroups: comp.lang.ada Subject: Re: Memory leak - What the ...? Date: Mon, 11 Oct 2004 09:56:07 +0100 Organization: BAE SYSTEMS Message-ID: <416a4936$1_1@baen1673807.greenlnk.net> References: <1115377.iDqY0doAkG@linux1.krischik.com> X-Trace: news.uni-berlin.de 85CXDXV1GRvbOqHm8X6lNgMDrbnSaMwB2YpUKiPKWtOvtwcGiC X-Orig-Path: baen1673807.greenlnk.net!baen1673807!not-for-mail X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Original-NNTP-Posting-Host: baen1673807.greenlnk.net Xref: g2news1.google.com comp.lang.ada:5034 Date: 2004-10-11T09:56:07+01:00 List-Id: Martin Krischik wrote: > Marius Amado Alves wrote: > >>> if This.Data /= null then >>> This.Data := new Stream_Element_Array'(This.Data.all); >>> end if; >> >> To my pointerless eyes this looks very leaky. > > Why? It look OK to me. Of course one would expect This.Data to be > initialised in Initialize so that This.Data is allways /= null... This code says: "If this pointer contains anything (not null) then make it point to something new /without/ dealing with the original". But it is still early... ;-)