🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #3633

Re: delete or delete[] ???

#3633
From: Perry Michael James
Date: Mon, 11 Mar 1996 00:32
23 lines
1562 bytes
b91926@fsgi01.fnal.gov (David Sachs) writes:

>Should delete or delete[] be used for a pointer to an array type?

>// It is assumed that some_type is an existing type
>typedef some_type array_type[10];

You need to use delete [] variable when the variable type is an array of
any kind.  


--
//     "C makes it easy to shoot yourself in the foot.  C++ makes it
//      harder, but when you do, it blows away your whole leg."
//             
//                                       -- Bjarne Stroustrup on C++ 
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your 
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu 
]
Technical Details
Message-ID: <4hqnnu$ph6@vixen.cso.uiuc.edu>
Path: arc1-ca.pugleaf.net!chronicle.mti.sgi.com!austern
References: <4hnqvf$mgr@fsgi01.fnal.gov>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!chronicle.mti.sgi.com!austern
From: mj-perry@students.uiuc.edu (Perry Michael James)
Newsgroups: comp.std.c++
Subject: Re: delete or delete[] ???
Date: 10 Mar 1996 16:32:52 PST
Organization: University of Illinois at Urbana
Approved: austern@isolde.mti.sgi.com
Message-ID: <4hqnnu$ph6@vixen.cso.uiuc.edu>
References: <4hnqvf$mgr@fsgi01.fnal.gov>
NNTP-Posting-Host: isolde.mti.sgi.com
Keywords: delete
X-Original-Date: 9 Mar 1996 01:43:26 GMT
X-Auth: PGPMoose V1.1 PGP comp.std.c++
 iQBVAwUBMUN00Ey4NqrwXLNJAQEppAH9FRBsygYosbFkkXF0XTrqHQnuyiOIFwYd
 UPfWNek0RJulZqfGUgO+K0GNiB/Ww1tBP3JZGLLzwpTLtlG5zCCNxQ==
 =97Ru
Originator: austern@isolde.mti.sgi.com