Should IDisposable be applied cascadingly?

前端 未结 9 1594
灰色年华
灰色年华 2020-12-31 06:48

This is a rather basic question, however I\'m still struggling with it a little.

IDisposable is implemented, when you want to enable the user of an object to free un

9条回答
  •  感动是毒
    2020-12-31 07:03

    It is certainly best practice to do so, especially when working with heavy/unmanaged objects.

    Edit: Best practice, but not mandatory.

提交回复
热议问题