| Thread overview |
|---|
April 25, 2004 [BUG] assert() in dtor causes access violation | ||||
|---|---|---|---|---|
| ||||
[code]
class A {
~this() { assert(false); }
}
void main() {
A a = new A();
}
[/code]
In static dtor assert() causes AV too.
| ||||
April 25, 2004 Re: [BUG] assert() in dtor causes access violation | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Sark7 | Are you sure you're seeing an access violation, or are you seeing an uncaught exception? "Sark7" <sark7@mail333.com> wrote in message news:opr60vkie1ut8jae@news.digitalmars.com... > [code] > class A { > ~this() { assert(false); } > } > void main() { > A a = new A(); > } > [/code] > > In static dtor assert() causes AV too. > | |||
April 26, 2004 Re: [BUG] assert() in dtor causes access violation | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Walter | On Sun, 25 Apr 2004 11:38:50 -0700, Walter <walter@digitalmars.com> wrote:
> Are you sure you're seeing an access violation, or are you seeing an
> uncaught exception?
>
Hmm... sorry, it is a uncaught exception. I have been mangled with different behaivour of
assert() in ctor & dtor. Why in ctor exception is handled by default, but in dtor it is not?
Spec says nothing about that.
Thanks.
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply