Virtual destructor failed call on gcc 2.95.2
Alexandre Oliva
oliva@lsd.ic.unicamp.br
Thu Nov 18 11:29:00 GMT 1999
On Nov 18, 1999, "Barry M. Caceres" <barryc@itravelpartners.com> wrote:
> The problem comes with the "array delete" operator. Virtual destructors are
> NOT properly being called.
delete[] is not supposed to call virtual destructors, only the
non-array version of delete is. `delete[] ptr' invokes undefined
behavior if the static type of *ptr is different from the dynamic type
of the elements of the array it points to.
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{lsd.ic.unicamp.br,guarana.{org,com}} aoliva@{acm,computer}.org
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them
More information about the Gcc-bugs
mailing list