[dmd-internals] Destructors are not virutal

Daniel Murphy yebblies at gmail.com
Tue Jan 24 05:04:00 PST 2012


Hmm... Did you post that on the newsgroup a while back?  I remember
someone had something like that working.

I'm modifying the compiler so it will link directly.  I've got static
and non-virtual struct and class members working so far.  It's here if
you're interested - some is working but it's not very polished.

https://github.com/yebblies/dmd/compare/master...cpplinking

It is somewhat complicated by the fact I'm testing it with the c++
codebase I'm most unfamiliar with - the d compiler.

On Tue, Jan 24, 2012 at 11:39 PM, Martin Nowak <dawg at dawgfoto.de> wrote:
> On Tue, 24 Jan 2012 12:35:42 +0100, Daniel Murphy <yebblies at gmail.com>
> wrote:
>
>> On Tue, Jan 24, 2012 at 5:56 PM, Walter Bright <walter at digitalmars.com>
>> wrote:
>>>
>>>
>>> Because it's handled specially - not through the vtbl[].
>>
>>
>> Hmmm ok.  Is the an optimization or is it essential?  I don't suppose
>> it's documented anywhere?
>>
>> I'm trying to improve the c++ interop and this wasn't as I expected.
>> I can always special case it for c++ classes.
>
>
> I case it might help you, I wrote some code to wire up C++ destructors with
> D's finalizer.
> https://gist.github.com/1391734
>
> _______________________________________________
> dmd-internals mailing list
> dmd-internals at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-internals


More information about the dmd-internals mailing list