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,17f2366fc6172420 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!feedme.ziplink.net!news.swapon.de!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Access Type Date: Mon, 27 Dec 2010 18:15:27 +0000 Organization: A noiseless patient Spider Message-ID: References: <8d8e1094-d021-4456-85fb-bbb2f3911334@m7g2000vbn.googlegroups.com> <3af2d3d1-ede9-4255-a31b-c5f66c6cee2e@c2g2000yqc.googlegroups.com> <87hbe0m1be.fsf@ludovic-brenta.org> <878vzbm7ah.fsf@ludovic-brenta.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx03.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="665"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+5w/lM3olT+j8PXqrHIU1fwj5dL08VfjY=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) Cancel-Lock: sha1:AspM3tHxRGZ3hi7BvY/j+5vtwAY= sha1:5WlaQ7d8HSBUukXwanop2d6LB8c= Xref: g2news1.google.com comp.lang.ada:16161 Date: 2010-12-27T18:15:27+00:00 List-Id: Ludovic Brenta writes: > Simon Wright writes on comp.lang.ada: >> Ludovic Brenta writes: >> >>> C_Function (Interfaces.C.To_C ("Ada string")); >> >> Is there a potential memory leak lurking here? > > No, the char_array is on the stack and passed as a char* to the C > function. I guess I was thinking of Interfaces.C.Strings.chars_ptr.