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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,965fbd9798ca1677 X-Google-Attributes: gid103376,public From: lutz@iks-jena.de (Lutz Donnerhacke) Subject: Re: Return by reference Date: 1999/11/07 Message-ID: #1/1 X-Deja-AN: 545537658 Distribution: world Content-Transfer-Encoding: 8bit References: Followup-To: poster Content-Type: text/plain; charset=ISO-8859-1 Organization: IKS GmbH Jena Mime-Version: 1.0 User-Agent: slrn/0.9.5.7 (UNIX) Newsgroups: comp.lang.ada Date: 1999-11-07T00:00:00+00:00 List-Id: * Brian Rogoff wrote: >> Of course it is possible. The idea is to deal with a pointer to a dynamic >> array only. The Format function allocates and the To_String function >> releases the memory. > >But then you have to heap allocate. That seems rather heavy. I think >Matthew Heaney's suggestion is the most promising for reducing copying, >but it appears too "naughty" to me. I'll just live with the copying. So lets add three alternatives to the pool of reusable packages and deal with the next problem.