Dispose question

后端 未结 7 1852
無奈伤痛
無奈伤痛 2021-02-14 02:17

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:13

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

提交回复
热议问题