Reference Type

Noun · Development

Definitions

  1. A type whose variables hold a reference (pointer) to data on the heap rather than the data itself, meaning assignment copies the reference, not the object — so two variables can alias the same instance. Classes in C#, Java, and Python are reference types, as opposed to value types like structs and primitives.

    In plain English: A kind of data where copying a variable just copies a pointer, not the actual data, so two variables can end up sharing the same thing.

    Example: "Both variables point to the same list because arrays are reference types — mutating one mutates the other."

Related Terms