<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 23 June 2017 at 10:52, Nicholas Wilson via Digitalmars-d <span dir="ltr"><<a href="mailto:digitalmars-d@puremagic.com" target="_blank">digitalmars-d@puremagic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Friday, 23 June 2017 at 00:33:55 UTC, Manu wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
On 23 June 2017 at 09:32, Nicholas Wilson via Digitalmars-d < <a href="mailto:digitalmars-d@puremagic.com" target="_blank">digitalmars-d@puremagic.com</a>> wrote:<br>
<br>
</span><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Thursday, 22 June 2017 at 12:52:26 UTC, Manu wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
How do I properly implement object destruction of extern(C++) classes<br>
(with<br>
virtual destructors)?<br>
<br>
[...]<br>
<br>
</blockquote>
<br>
Also didn't Ethan come up with a solution for this for Binderoo?<br>
<br>
</blockquote>
<br></div></div>
I'm not sure...<br>
</blockquote>
<br>
I'm pretty sure he manually constructs the vtbl and inserts the virtual function into it, so it should just be a case of calling the virtual destructor.<br>
<br>
Have a look at this DConf 2017 talk.<br>
</blockquote></div><br></div><div class="gmail_extra">I do that, but that doesn't mean the destructors work. object.destroy() just crashes.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Believe me, I've been messing with this a lot. The answer to this email is some code that satisfies the criteria, I've tried a lot of things.</div></div>