Reference
Related terms: object reference, pointer, handle, null, instance
A way to refer to an existing object so code can read it or call its methods. Two variables can refer to the same instance. Changing that object through one variable is then visible through the other.
A reference is different from a copy of the object. It may be empty, or its target may have been destroyed, so check validity where lifetimes can differ. Whether it keeps an object alive depends on the language and engine.
- Further reading
- Microsoft: Reference types (C# reference)