This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Problems with delete after a forward reference.


Tim Gibney wrote:
> 
>     I have found a difference between Visual C++ and gcc 2.95.2.  The short
> version is that if you do a forward reference of a class you can not issue
> a delete on an object of that class in gcc but you can in Visual C++.

You are not supposed to apply delete on a pointer to an incomplete class
type because you don't know if the destructor of that class is virtual.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]