Destructing Struct

Adam D. Ruppe destructionator at gmail.com
Wed Feb 21 13:43:18 UTC 2018


On Wednesday, 21 February 2018 at 12:07:47 UTC, ketmar wrote:
> `p.destroy` will call the dtors for you.

So it is the same function but I prefer to always write it:

.destroy(p);

yes, a leading dot. This ensures you call the top-level destroy 
function instead of any members which may not do the same thing.


More information about the Digitalmars-d-learn mailing list