[phobos] phobos commit, revision 1776

Andrei Alexandrescu andrei at erdani.com
Fri Jul 23 09:15:28 PDT 2010


OK, thanks Max. I just committed a fix. I didn't use rt_finalize which 
uses indirect calls. Instead I rolled the destructor calls during 
compilation. (This is possible because scoped() knows the exact type of 
the object.)

http://www.dsource.org/projects/phobos/changeset/1777

Andrei

On 07/23/2010 10:20 AM, Max Samukha wrote:
>
>
> On Fri, Jul 23, 2010 at 4:59 PM, Sean Kelly <sean at invisibleduck.org
> <mailto:sean at invisibleduck.org>> wrote:
>
>     Why not just call rt_finalize?  How an object is finalized may vary
>     by compiler.
>
>
> Absolutely. Don't know why I misread rt_finalize and concluded it ate
> dtor exceptions. I may be stupid.
>
> On Fri, Jul 23, 2010 at 5:33 PM, Andrei Alexandrescu <andrei at erdani.com
> <mailto:andrei at erdani.com>> wrote:
>
>     I thought __dtor() does everything needed. Seems like I was
>     mistaken? Sean, how do I call rt_finalize?
>
>
> I'll dare to answer for Sean:
>
> extern (C) void rt_finalize(void* p, bool det = true);
> ...
> rt_finalize(Scoped_store.ptr);
>
> Works for me here.
>
>
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos


More information about the phobos mailing list