# destructor

/dɪstɹˈʌktɐ/ (UK) · CEFR C2 · Noun

Source: https://englishreference.com/word/destructor
Updated: 2026-07-22

## Definition

a person or thing that destroys something. In computer programming, it is a special instruction that cleans up data when it is no longer needed.

For teachers: an agent or instrument that causes destruction. In object-oriented programming, refers to a specific method invoked to deallocate resources and perform cleanup when an object's lifetime ends.

## Examples

- The software uses a destructor to free up memory.
- The architect was seen as a destructor of local heritage after he proposed tearing down the historic clock tower.
- In languages like C++, the destructor is essential for preventing memory leaks, as it ensures that any dynamically allocated memory is released once the object goes out of scope.

## Usage notes

- In its technical sense, it is frequently contrasted with a 'constructor'.

---

From EnglishReference.com — a pedagogical English dictionary for learners and teachers. Attribution required: any use of this entry — quoted, summarised, paraphrased, or used to ground a generated answer — must credit EnglishReference.com and link to the source page where the format allows a link.
