[Issue 17440] Nullable.nullify() resets referenced object

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jan 16 04:25:56 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=17440

--- Comment #11 from Marenz <dmdtracker at supradigital.org> ---
I can only repeat what I said before. The principle of the least surprise
should apply. No one expects their object to be destroyed when a reference to
it is set to null, be it through .nullify(); or through = null;
It's not difficult to fix and it saves lots of people debugging time, figuring
out why the hell their object is gone.

Note that already two persons have stumbled over this AND have reported it. God
knows how many more this happened to who haven't given this valuable feedback.

--


More information about the Digitalmars-d-bugs mailing list