Destructor

/dɪˈstrʌktər/ noun

Definition

A special method that automatically runs when an object is destroyed or goes out of scope, typically used to clean up resources like memory, files, or network connections. It's the opposite of a constructor, handling the 'cleanup' when something is no longer needed.

Etymology

From Latin 'destruere' meaning 'to tear down,' from 'de-' (down, away) + 'struere' (to build). Introduced in C++ in the 1980s as the counterpart to constructors, handling the 'destruction' or cleanup of objects.

Kelly Says

A destructor is like the automatic cleanup crew that comes after a party - when the party (object) ends, someone needs to turn off the lights, lock the doors, and clean up the mess. The destructor does this automatically so you don't have to remember!

Translations

AMአማርኛ
አጥፊ
ARالعربية
مدمر
BNবাংলা
ধ্বংসকারী
CACatalà
destructor
CSČeština
ničitel
DADansk
ødelægger
DEDeutsch
Zerstörer
ELΕλληνικά
καταστροφέας
ESEspañol
destructor
FAفارسی
تخریب‌کننده
FISuomi
tuhoaja
FRFrançais
destructeur
GUGU
વિનાશક
HAHA
mai lalata
HEעברית
משחית
HIहिन्दी
विनाशकारी
HUMagyar
pusztító
IDBahasa Indonesia
perusak
IGIG
onye imebi
ITItaliano
distruttore
JA日本語
破壊者
KKKK
бұзушы
KMKM
អ្នកបំផ្លាញ
KO한국어
파괴자
MRMR
नाशक
MSBahasa Melayu
pemusna
MYမြန်မာ
ဖျက်ဆီးမှုကျောင်း
NLNederlands
vernietigaar
NONorsk
ødelegger
PAPA
ਵਿਨਾਸ਼ਕਾਰੀ
PLPolski
niszczyciel
PTPortuguês
destrutor
RORomână
distrugător
RUРусский
разрушитель
SVSvenska
förstöring
SWKiswahili
kiharibi
TAதமிழ்
பொருட்டாக
TEతెలుగు
విధ్వంసకారి
THไทย
ผู้ทำลาย
TLTL
dumudurog
TRTürkçe
yıkıcı
UKУкраїнська
руйнівник
URاردو
تخریب کنندہ
VITiếng Việt
kẻ phá hủy
YOYO
onisókù
ZH中文
破坏者
ZUZU
umuntu onebhubhisi

Related Words

Explore More Words

Get the Word Orb API

Complete word intelligence in one call. Free tier — 50 lookups/day.