Why would an initialised struct pointer field be null in the struct's destructor?
Adam D. Ruppe via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun May 21 05:48:10 PDT 2017
On Saturday, 20 May 2017 at 10:48:54 UTC, Gary Willoughby wrote:
> // Why is this._foo null here???
The others have answered why and what to do, but note that
according to the spec, that any struct should be able to have its
destructor called, so you should do a null check in there anyway.
More information about the Digitalmars-d-learn
mailing list