struct destructors

Alexander aldem+dmars at nk7.net
Mon May 9 09:21:13 PDT 2011


Are those supposed to be called when struct was allocated on the heap and is collected by GC?

According to my observations (DMD 2.052 Linux), they are called only when:
- struct is allocated on the stack and goes out of scope;
- explicit delete is called on heap-allocated struct.

/Alexander


More information about the Digitalmars-d mailing list