https://issues.dlang.org/show_bug.cgi?id=519

--- Comment #17 from Martin Nowak <c...@dawg.eu> ---
(In reply to Andrei Alexandrescu from comment #16)
> I stated this elsewhere, just making sure I don't forget: probably we don't
> want to invoke invariants during the GC cycle.

Walter has a different opinion on this, I don't follow his argument though.
http://forum.dlang.org/post/m753hk$pt2$1...@digitalmars.com

Currently it can't be done, because the calls to the invariant are embedded
into the generated destructor function.

Also the invariant is called twice, before and after running the destructor.
The latter forces one to perform additional cleanup, e.g. setting pointers to
null.

--

Reply via email to