RAII pointers
ag0aep6g via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Jun 3 12:21:58 PDT 2017
On 06/03/2017 09:06 PM, Moritz Maxeiner wrote:
> - null check in destructor: That's just because I forgot to add it. If
> you add `@disable(this)` (disable the default constructor), all
> elaborate constructors ensure it is not null, and no members can set it
> to null, you might be able to skip the check, but I may have missed some
> corner cases, so better be safe.
`.init` is the corner case. `.init` is always there, even with `@disable
this();`.
More information about the Digitalmars-d-learn
mailing list