Dispose question

后端 未结 7 1970
北荒
北荒 2021-02-14 02:51

I have a number of classes which have private member variables that implement IDisposable (timers, brushes, etc). Do I need to do anything to ensure these variables are cleaned

7条回答
  •  臣服心动
    2021-02-14 03:23

    If your class has member variables that implement IDisposable, then your class should implement it as well. You clean up what you own.

提交回复
热议问题