Re: C++ interop; object destruction

2017-06-22 Thread Manu via Digitalmars-d
On 23 June 2017 at 13:45, Danni Coy via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > > > On Fri, Jun 23, 2017 at 10:52 AM, Nicholas Wilson via Digitalmars-d < > digitalmars-d@puremagic.com> wrote: > >> >>> >> I'm pretty sure he manually constructs the vtbl and inserts the virtual >> funct

Re: C++ interop; object destruction

2017-06-22 Thread Manu via Digitalmars-d
On 23 June 2017 at 10:52, Nicholas Wilson via Digitalmars-d < digitalmars-d@puremagic.com> 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 < >> digitalmars-d@puremagic.com> wrote: >> >> On Thursday, 22 June 2017 at 12:5

Re: C++ interop; object destruction

2017-06-22 Thread Danni Coy via Digitalmars-d
On Fri, Jun 23, 2017 at 10:52 AM, Nicholas Wilson via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > >> > 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 DCon

Re: C++ interop; object destruction

2017-06-22 Thread Nicholas Wilson via Digitalmars-d
On Friday, 23 June 2017 at 00:33:55 UTC, Manu wrote: On 23 June 2017 at 09:32, Nicholas Wilson via Digitalmars-d < digitalmars-d@puremagic.com> 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 d

Re: C++ interop; object destruction

2017-06-22 Thread Manu via Digitalmars-d
On 23 June 2017 at 09:32, Nicholas Wilson via Digitalmars-d < digitalmars-d@puremagic.com> 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 Eth

Re: C++ interop; object destruction

2017-06-22 Thread Nicholas Wilson via Digitalmars-d
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?

Re: C++ interop; object destruction

2017-06-22 Thread ketmar via Digitalmars-d
Nicholas Wilson 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)? I'm not going to embarrass myself by pasting some of my attempts to achieve this goal to date. I take it you tried

Re: C++ interop; object destruction

2017-06-22 Thread Nicholas Wilson via Digitalmars-d
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)? I'm not going to embarrass myself by pasting some of my attempts to achieve this goal to date. I take it you tried calling super.~this() al

C++ interop; object destruction

2017-06-22 Thread Manu via Digitalmars-d
How do I properly implement object destruction of extern(C++) classes (with virtual destructors)? I'm not going to embarrass myself by pasting some of my attempts to achieve this goal to date. I've asked before, but I've never yet seen a sufficiently solution to this problem. Situation: I have a