<br>The implementation is still incomplete. It doesn&#39;t call base class dtors. This unittest should pass:<br><br>unittest<br>{<br>    class A { static bool dead; ~this() { dead = true; } }<br>    class B : A { static bool dead; ~this() { dead = true; } }<br>
    {<br>        auto b = scoped!B;<br>    }<br>    assert(B.dead);<br>    assert(A.dead);<br>}<br><br>A less severe problem is that it doesn&#39;t delete the object&#39;s monitor if one was allocated.<br><br>Please refer to rt_finalize for correct destruction sequence. Essentially, Scoped dtor should do what rt_finalize does except there is no need to catch destructor exceptions and I&#39;m not sure about collectHandler. Sean, please comment?<br>