[Issue 10409] dtor / destructor not called for (rvalue) struct used in opApply

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jul 8 11:34:10 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10409


Iain Buclaw <ibuclaw at ubuntu.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibuclaw at ubuntu.com


--- Comment #3 from Iain Buclaw <ibuclaw at ubuntu.com> 2013-07-08 11:34:09 PDT ---
>From the backend's perspective, the frontend represents the code in this way:

try
{
    DestroyMe __sl5;
    DestroyMe.opApply (&__sl5, {.object=0B, .func=__foreachbody6});
    apply.DestroyMe.~this (&__sl5);
}
catch (struct Throwable &)
{
}


try
{
    struct DestroyMe lvalue;

    try
    {
        DestroyMe.opApply (&lvalue, {.object=0B, .func=__foreachbody8});
    }
    finally
    {
        apply.DestroyMe.~this (&lvalue);
    }
}
catch (struct Throwable &)
{
}


In this instance, you could either say that it is the job of the backend to
wrap ExpDtorStatement's in try{} finally{} blocks, or fix the frontend to
generate a matching representation.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list