General Rule for When to Implement IDisposable

后端 未结 6 1433
南旧
南旧 2020-11-29 12:00

EDIT: This question is a duplicate of What is the difference between managed and native resources when disposing? (.NET) and many others. Please answer the

6条回答
  •  暖寄归人
    2020-11-29 12:16

    From MSDN: http://msdn.microsoft.com/en-us/library/system.idisposable.aspx

    Use the Dispose method of this interface to explicitly release unmanaged resources in conjunction with the garbage collector. The consumer of an object can call this method when the object is no longer needed.

提交回复
热议问题