Article View: borland.public.cppbuilder.nativeapi
Article #4996Re: char *buf is bugged ?
From: Thomas Maeder [TeamB]
Date: Mon, 24 Oct 2005 20:30
Date: Mon, 24 Oct 2005 20:30
10 lines
1643 bytes
1643 bytes
"Alfred" <alf@no.spam.not.valied.email> writes: > Wow I never used vector before, they are great. Thank you very much :) > What about : char * buf=new char[Size]; ? > It is good like a vector or it is not a good idea to use ? It's significantly more complicated to correctly (i.e. not too early, not too late) and reliably (no leaks) free the memory with a "raw" array than with a container object, particulary because C++ has exceptions that may cause functions to be left at unexpected places.
Technical Details
Message-ID:
<m24q76d5eg.fsf@madbox2.local>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<435cd85e$1@newsgroups.borland.com> <435ce2e1$1@newsgroups.borland.com> <435d2986$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,a803499fd1f61208
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: char *buf is bugged ?
References: <435cd85e$1@newsgroups.borland.com> <435ce2e1$1@newsgroups.borland.com>
<435d2986$1@newsgroups.borland.com>
From: maeder@glue.ch (Thomas Maeder [TeamB])
Organization: TeamB
X-Face: ":yn4zt^A_dn>6~{YJmu^B\'4w)e:apPM\VC=Dvf&*tASxX9|BYczkFd$xr.$vNSZ[3Uobr p]c4\+\l){!WQI.$]veP({HLd;CDYH?iN
Date: Mon, 24 Oct 2005 22:30:31 +0200
Message-ID: <m24q76d5eg.fsf@madbox2.local>
User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux)
Cancel-Lock: sha1:NR5p5H4rnVqu0S+b2PE/V6yS/QU=
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
NNTP-Posting-Host: 84.73.152.93
X-Trace: newsgroups.borland.com 1130185691 84.73.152.93 (24 Oct 2005 13:28:11 -0700)
Lines: 10
X-Authenticated-User: tmaeder
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail