🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #4805

Re: closing form

#4805
From: Alfred
Date: Wed, 23 Nov 2005 21:11
25 lines
1816 bytes

>Passing by const reference means you don't ask the compiler to make a
>copy of something. The copy then has to be destroyed afterwards. Thus,
>passing by value involves
>
>  a call to the copy constructor of the parameter type
>  a call to the destructor of the parameter type
>
>whereas pass by const reference doesn't require anything.
>
>The copy constructor for AnsiString is _relatively_ cheap, since it uses
>reference counting. Otherwise, that constructor would require a call to
>the memory manager, and the destructor would require another call.

Mmmm, sorry I am not native english, i am confused now..
If I use a AnsiString I have to destroy it. How can i destroy it ?
void __fastcall TForm1::test(String Test)
{
  delete[] test; ????
}

I have to destroy only AnsiString ? And Int value ?
Thank you very much
Alfred
Technical Details
Message-ID: <4384e923$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsread.com!news-xfer.newsread.com!news-out.usenet.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <4383d048$1@newsgroups.borland.com> <4383e16c$1@newsgroups.borland.com> <43845eca$1@newsgroups.borland.com> <lpo8o110u0opfcsolccao66rf26vk3nm38@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,9d517b38f0628b82
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Alfred" <alf@no.spam.not.valid.email>
Sender: "Alfred" <alf@no.spam.not.valid.email>
Reply-To: "Alfred" <alf@no.spam.not.valid.email>
Subject: Re: closing form
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 82.52.136.203     
References: <4383d048$1@newsgroups.borland.com> <4383e16c$1@newsgroups.borland.com> <43845eca$1@newsgroups.borland.com> <lpo8o110u0opfcsolccao66rf26vk3nm38@4ax.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <4384e923$1@newsgroups.borland.com>
Date: 23 Nov 2005 14:11:47 -0700
X-Trace: newsgroups.borland.com 1132783907 207.105.83.66 (23 Nov 2005 14:11:47 -0700)
Lines: 25
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsread.com!news-xfer.newsread.com!news-out.usenet.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail