dereference
Following a reference or pointer to reach the value it points at.
In more detail
Dereferencing a null reference or nil pointer is a common crash at run time. Some compilers, such as C# with nullable reference types, warn when code dereferences something that might be null.
Examples
code.Length dereferences code (C# warning CS8602 if code may be null)*label = *label + "-ready"Related terms
- null-keyword — A special value meaning a reference points at nothing.
- CS8602 — The C# compiler warning 'dereference of a possibly null reference', raised when code uses a value that might be null without checking it.
- pointer — A value that stores the memory location of another piece of data, so the program can follow it to that data.
- address operator — The & operator in Go, which takes the memory address of a variable and gives you a pointer to it.
- nil pointer dereference — Trying to follow a pointer that is nil, which makes a Go program panic with an invalid memory address error.
Taught in
- The C# Language: Types, Variables, and Flow Control — Modern .NET Core, C# & Enterprise Microservices
- Pointers and Memory — Concurrent Systems Programming with Go