[phobos] phobos commit, revision 1776
Max Samukha
maxsamukha at gmail.com
Fri Jul 23 02:17:25 PDT 2010
The implementation is still incomplete. It doesn't call base class dtors.
This unittest should pass:
unittest
{
class A { static bool dead; ~this() { dead = true; } }
class B : A { static bool dead; ~this() { dead = true; } }
{
auto b = scoped!B;
}
assert(B.dead);
assert(A.dead);
}
A less severe problem is that it doesn't delete the object's monitor if one
was allocated.
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'm not sure about collectHandler. Sean, please
comment?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/phobos/attachments/20100723/f89bdde8/attachment.html>
More information about the phobos
mailing list