pointer
A value that stores the memory location of another piece of data, so the program can follow it to that data.
In more detail
Passing a pointer lets a function change the original value instead of a copy, and lets many parts of a program share one value. A pointer that points at nothing is called null or nil, and following it crashes the program in most languages.
Examples
p := &name
*p = "worker"React fibers use child, sibling and return pointers to form a tree that can be walked without recursion.Related terms
- memory address — The number that identifies one byte's position in memory, much like a house number on a very long street.
- linked list — A sequence made of nodes scattered in memory, each holding a value and a pointer to the next node.
- node (data structure) — One element of a linked structure, holding a value and one or more pointers to other nodes.
- address operator — The & operator in Go, which takes the memory address of a variable and gives you a pointer to it.
- dereference — Following a reference or pointer to reach the value it points at.
- nil — The Go value meaning nothing or not set, which is the zero value for pointers, slices, maps, channels, functions, interfaces and errors.
- pointer receiver — A method receiver declared as a pointer, such as (c *Counter), which lets the method change the original value rather than a copy.
- memory — The fast, temporary working space where running programs keep their data; it is emptied when the machine powers off.
- Fiber — The internal object React keeps for each component instance, and the name of the React 16+ engine built on those objects.
Taught in
- Space, In-Place Work And The Call Stack — Algorithms & Data Structures for Working Engineers
- Hash Tables: Chaining, Open Addressing And Load Factor — Algorithms & Data Structures for Working Engineers
- Arrays: Contiguous Memory And Constant-Time Access — Algorithms & Data Structures for Working Engineers
- Linked Lists: Nodes, Pointers And Sentinels — Algorithms & Data Structures for Working Engineers
- Choosing The Right Sequence — Algorithms & Data Structures for Working Engineers
- Binary Trees And Their Traversals — Algorithms & Data Structures for Working Engineers
- Variables, Typing, and Zero Values — Concurrent Systems Programming with Go
- Pointers and Memory — Concurrent Systems Programming with Go
- Structs and Methods — Concurrent Systems Programming with Go
- Type Assertions and the Empty Interface — Concurrent Systems Programming with Go
- The Standard testing Package — Concurrent Systems Programming with Go
- Goroutines and Concurrent Execution — Concurrent Systems Programming with Go
- Parsing Arguments with flag — Concurrent Systems Programming with Go
- React Fiber Architecture: Work Units, Priority And Commits — React 19 & Modern Component Architecture
- Rules of Hooks: Call Order, Hook Lists, And Fiber Storage — React 19 & Modern Component Architecture