Inheritance and Destructors in C#

后端 未结 7 1008
灰色年华
灰色年华 2021-02-13 19:30

According to this, it states that Destructors cannot be inherited or overloaded. In my case, for all subclasses, the destructors will be identical. Is this pretty m

7条回答
  •  -上瘾入骨i
    2021-02-13 19:52

    I've been doing .NET programming for close to a decade. The only time I implemented a finalizer, it ended up being a cause for a memory leak and nothing else. You almost never need them.

提交回复
热议问题