Cycle detected between modules with ctors/dtors

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Mar 4 21:04:45 PST 2015


On Wed, 04 Mar 2015 11:06:50 -0500, Steven Schveighoffer wrote:

> Clearly, the above is not an issue, but at the moment, the code treats
> having a ctor and having a dtor as the same thing. How to fix it? I'm
> not exactly sure, you need to have the modules sorted according to ctor
> and also according to dtor. The runtime is supposed to run dtors in
> reverse order from ctor calls, and I think we should not break that. But
> there is definitely room to allow for reordering when ctors are not
> affected.
> 
> I'll have to think about it some more.

maybe do simply the thing you wrote, and have two independent lists. or, 
strictly saying, four independent lists: for shared ctors, for static 
ctors, for static dtors, for shared dtors.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20150305/72eacbcc/attachment.sig>


More information about the Digitalmars-d-learn mailing list