Home [C# 筆記] destructor 解構函式
Post
Cancel

[C# 筆記] destructor 解構函式

解構函式

作用:幫助我們釋放資源

1
2
3
4
~Student()
{
    ....
}

如果你希望程式結束後,能馬上釋放資源就可以用解構函式

classes-and-structs/finalizers

This post is licensed under CC BY 4.0 by the author.