This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
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.