开发者

IDisposable Example

I am looking for an example in which shows dispose pattern of .net with managed and un-managed resourced are allocated. In every text boo开发者_运维技巧k only code snippets are shown.


As of .net 2.0 it's advised to use SafeHandles to manage resources, as detailed on this MSDN page.


MSDN has an example on its IDisposable.Dispose Method page, although as per comments, this is outdated.


I think that all you have to know is very well described in the following article "Digging into IDisposable" on MSDN : http://msdn.microsoft.com/en-us/magazine/cc163392.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜