[Issue 20082] Struct with extern destructor that's never called causes link error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jul 25 18:43:21 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=20082

--- Comment #4 from Manu <turkeyman at gmail.com> ---
(In reply to kinke from comment #3)
> (In reply to Manu from comment #2)
> > I suspected the TypeInfo, but shouldn't that only contain destructor for
> > classes?
> 
> Nope, it's needed to implement the `destroy(void*)` method.

What is that? I don't want it...

> > In my case, the struct is extern(C++) too, which means the D TypeInfo
> > shouldn't even exist?
> 
> That seems to be a common misconception. Without D TypeInfo, you'd lose the
> ability to have dynamic arrays of that extern(C++) struct,

Why?

> associative
> arrays with that struct as key type etc. etc.

Why?

--


More information about the Digitalmars-d-bugs mailing list