www.digitalmars.com         C & C++   DMDScript  

D - Problems

reply "Vathix" <Vathix kernel.net> writes:
I used .rehash on an associative array, a couple times the compiler gave me:
Assertion failure: 'fd->type->next->equals(treturn)' on line 880 in file
'func.c'
I would have to just remove it for it to work, and other times it worked
fine. I guess it has to do with surrounding code.

When I threw an exception from a module's static constructor, main() was
still entered. Should this be? If so, why?

Remaining objects destructors aren't being called on program exit, unless I
explicitly delete them.
Apr 19 2003
parent reply "Matthew Wilson" <matthew stlsoft.org> writes:
 When I threw an exception from a module's static constructor, main() was
 still entered. Should this be? If so, why?
Doesn't sound good
 Remaining objects destructors aren't being called on program exit, unless
I
 explicitly delete them.
Does this include "auto" qualified ones?
Apr 19 2003
parent reply "Vathix" <Vathix kernel.net> writes:
 When I threw an exception from a module's static constructor, main() was
 still entered. Should this be? If so, why?
Doesn't sound good
Actually, this isn't always the case. I realized it was because it was my WinMain() calling _moduleCtor(), so it does make sense.
 Remaining objects destructors aren't being called on program exit,
unless
 I
 explicitly delete them.
Does this include "auto" qualified ones?
This, too, isn't always the case. It isn't calling the destructor when I have a global reference and assign a new object to it in another function, like main. "auto" works correctly.
Apr 19 2003
parent "Walter" <walter digitalmars.com> writes:
"Vathix" <Vathix kernel.net> wrote in message
news:b7t6ed$23n$1 digitaldaemon.com...
 This, too, isn't always the case. It isn't calling the destructor when I
 have a global reference and assign a new object to it in another function,
 like main. "auto" works correctly.
The global reference is the problem. The gc still regards it as being pinned by the global reference.
May 11 2003