Skip to content
EntityQ735151· pop 23· linked from 93 articles

Also known as dtor

函数

In the Vinony graph

Within Vinony's link graph, 解構子 is referenced by 93 other articles, and connects out to resource acquisition is initialization, new and International Standard Book Number.

It sits within the topics C++ and Method (computer programming).

Its subject is documented across 23 Wikipedia language editions.

Wikidata facts

Subclass of
method
Show 4 more facts
opposite of
constructor
notation
tilde
Sources (2)

via Wikidata · CC0

Article · 中文

解構子(英語:Destructor,有時簡稱 dtor)在面向对象程序设计裡是一個方法,當对象的生命週期結束時,它會自動地被呼叫執行。它最主要的目的在於,清空並釋放物件先前建立或是佔用的記憶體資源。解構子的整體使用概念關鍵在於RAII。一個具備垃圾回收機制的程式語言,無法確保解構子是否會被執行,通常這類的程式語言不屬於RAII的範圍內。這類的程式語言,只要經由某個適當的函式,通常會呼叫Dispose函式,做呼叫的動作,那麼它一定會從現有資源釋放物件。與使用垃圾回收機制的Finalize相比,建議使用解構子是釋放資源的適當做法。

Abstract from DBpedia / Wikipedia · CC BY-SA

Connections

Categories