On 09/03/2019 21:10, ANtlord via Digitalmars-d-learn wrote:
On Saturday, 9 March 2019 at 20:04:53 UTC, Paul Backus wrote:

You can end up with a null `this` reference if you dereference a null pointer to a struct and then call a method on the result. For example:

I can but my reference is not null before calling. Take a look at the line of code [0]. There is a check before the line.

https://github.com/ANtlord/deadmemory/blob/master/src/deadmemory/mem.d#L20 [0]

There is a typo in this instruction:

T* ptr = this.list.getFisrtFreeOrAdd(memViewLen).getPtr!T();
(may this explain your null? the compiler should complain)


Reply via email to