Should IDisposable be applied cascadingly?

前端 未结 9 1538
灰色年华
灰色年华 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:08

    Of course you can remove a lot of the (re)implementation cost of IDisposable and get something pretty close to deterministic finalization of objects on the managed heap if you use C++/CLI. This is a often (I find) overlooked aspect of a language that a lot of folks seem to consign to the "for glue code only" bin.

提交回复
热议问题