Unions destructors and GC precision

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Aug 14 13:32:58 PDT 2012


On 8/14/12 3:25 PM, bearophile wrote:
> D2 doesn't give you that restriction, and when an union goes out of
> scope it calls the destructors of all its fields:

That's pretty surprising. "Major bug" doesn't begin to describe it.

Unions should call no constructors and no destructors.


Andrei


More information about the Digitalmars-d mailing list