Article View: comp.std.c++
Article #1662Re: virtual delete for arrays
From: Steve Clamage
Date: Tue, 08 Aug 1995 16:53
Date: Tue, 08 Aug 1995 16:53
12 lines
904 bytes
904 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:
<4084qg$lm3@engnews2.Eng.Sun.COM>Path:
arc1-ca.pugleaf.net!engnews2.Eng.Sun.COM!usenetReferences:
<3vu6tv$b7k@tango.cs.wustl.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews2.Eng.Sun.COM!usenet From: clamage@Eng.Sun.COM (Steve Clamage) Newsgroups: comp.std.c++ Subject: Re: virtual delete for arrays Date: 8 Aug 1995 16:53:36 GMT Organization: Sun Microsystems Inc. Message-ID: <4084qg$lm3@engnews2.Eng.Sun.COM> References: <3vu6tv$b7k@tango.cs.wustl.edu> Reply-To: clamage@Eng.Sun.COM NNTP-Posting-Host: taumet2.eng.sun.com