From -1671540884042591834
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,afd7c5d805e2c577
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1993-03-30 21:41:30 PST
Newsgroups: comp.std.c++
Path: sparky!uunet!bcstec!plato!dogfish!dano
From: dano@dogfish.boeing.com (Dan Olson)
Subject: Re: Is delete [] always safe?
Message-ID: <C4qBJL.5AH@plato.ds.boeing.com>
Sender: nntp@plato.ds.boeing.com
Reply-To: dano@dogfish.ds.boeing.com (Dan Olson)
Organization: Boeing Space Systems Division
References: <1993Mar22.024915.14564@fcom.cc.utah.edu> <733083364snx@dspcproj.demon.co.uk>
Date: Wed, 31 Mar 1993 01:16:32 GMT
Lines: 11

What I want to know, why is 'delete [] ptr' syntax even needed?  The
total size of memory pointed to by ptr is known and so is the sizeof
*ptr, so the number of elements is known.  Why not just have 
'delete ptr' call the dtor for each element in the list?

Will someone enlighten me?


-- 
    UUCP: ..!uunet!bcstec!plato!dogfish!dano
Internet:  dano@dogfish.ds.boeing.com


