Thread overview
BUG: Abstract dtors
Oct 07, 2003
Lars Ivar Igesund
Re: Abstract dtors
Oct 08, 2003
Walter
Oct 08, 2003
Lars Ivar Igesund
October 07, 2003
I'm pretty sure that I've found a bug with abstract classes. I'm not sure what the bug really is.

I've made an abstract class with a dtor. It compiles,
but doesn't link (can't find the dtor or something).
Removing the dtor helps.

All this is a bit strange. If dtors in abstract classes are
disallowed, it must produce a compile error. If they
are allowed, well then it's a bug.

Another strange thing and the reason i discovered this;
It is allowed to 'new' objects in abstract classes. As
long as that is allowed, dtors must be allowed too.

My opinion on what should be the correct behaviour? 'new'ing objects and having dtors must be allowed.

Lars Ivar Igesund


October 08, 2003
Can you post a small example illustrating this, please? Thanks, -Walter

"Lars Ivar Igesund" <larsivi@stud.ntnu.no> wrote in message news:blv3oo$16bj$1@digitaldaemon.com...
> I'm pretty sure that I've found a bug with abstract classes. I'm not sure what the bug really is.
>
> I've made an abstract class with a dtor. It compiles,
> but doesn't link (can't find the dtor or something).
> Removing the dtor helps.
>
> All this is a bit strange. If dtors in abstract classes are
> disallowed, it must produce a compile error. If they
> are allowed, well then it's a bug.
>
> Another strange thing and the reason i discovered this;
> It is allowed to 'new' objects in abstract classes. As
> long as that is allowed, dtors must be allowed too.
>
> My opinion on what should be the correct behaviour? 'new'ing objects and having dtors must be allowed.
>
> Lars Ivar Igesund
>
>


October 08, 2003
"Walter" <walter@digitalmars.com> wrote in message news:bm0dig$2uoq$2@digitaldaemon.com...
> Can you post a small example illustrating this, please? Thanks, -Walter

Attached.

Lars Ivar Igesund