Article View: comp.std.c++
Article #1724Re: virtual delete for arrays
From: Steve Clamage
Date: Mon, 14 Aug 1995 06:50
Date: Mon, 14 Aug 1995 06:50
13 lines
961 bytes
961 bytes
In article b7k@tango.cs.wustl.edu, schmidt@tango.cs.wustl.edu (Douglas C. Schmidt) writes: >Hi, > >Can someone please clarify something for me? It would appear that in >SunC++ 4.0.1 and G++ 2.6.3 a base class pointer cannot be used to >delete an array of objects of a derived class. That's correct. To quote the draft standard on the subject of "delete[]", "if the dynamic type of the object to be deleted differs from its static type, the behavior is undefined." --- Steve Clamage, stephen.clamage@eng.sun.com
Technical Details
Message-ID:
<MATT.95Aug13235041@physics2.Berkeley.EDU>Path:
arc1-ca.pugleaf.net!128.32.155.1!mattReferences:
<3vu6tv$b7k@tango.cs.wustl.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!128.32.155.1!matt From: clamage@Eng.Sun.COM (Steve Clamage) Newsgroups: comp.std.c++ Subject: Re: virtual delete for arrays Date: 14 Aug 1995 06:50:41 GMT Organization: Sun Microsystems Inc. Approved: matt@physics2.Berkeley.EDU (Matt Austern) Message-ID: <MATT.95Aug13235041@physics2.Berkeley.EDU> References: <3vu6tv$b7k@tango.cs.wustl.edu> Reply-To: clamage@Eng.Sun.COM NNTP-Posting-Host: physics2.berkeley.edu