On 23 June 2017 at 10:52, Nicholas Wilson via Digitalmars-d < [email protected]> wrote:
> On Friday, 23 June 2017 at 00:33:55 UTC, Manu wrote: > >> On 23 June 2017 at 09:32, Nicholas Wilson via Digitalmars-d < >> [email protected]> wrote: >> >> On Thursday, 22 June 2017 at 12:52:26 UTC, Manu wrote: >>> >>> How do I properly implement object destruction of extern(C++) classes >>>> (with >>>> virtual destructors)? >>>> >>>> [...] >>>> >>>> >>> Also didn't Ethan come up with a solution for this for Binderoo? >>> >>> >> I'm not sure... >> > > 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. > > Have a look at this DConf 2017 talk. > I do that, but that doesn't mean the destructors work. object.destroy() just crashes. 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.
