https://d.puremagic.com/issues/show_bug.cgi?id=5710
--- Comment #31 from Martin Nowak <c...@dawg.eu> 2013-11-18 13:58:12 PST --- (In reply to comment #29) > #1 is necessary for the multiple-context delegates. But applying same rule for > existing one-context delegates will add hidden runtime cost against existing > code. For single context it's dg.ptr = cast(void*)c; For multi-context pointer it's void*[2] __ctxt = [cast(void*)c, funcThis]; dg.ptr = cast(void*)&__ctxt; And yes, if the delegate escapes the scope the __ctxt becomes a closure variable and is heap allocated (dg.ptr will point into the heap). -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------