由于MemoryStream是一个非托管资源,它总是需要处置吗?MemoryStream必须明确处置?
鉴于:
1) A method is invoked.
2) A MemoryStream object is created (MemoryStream ms = new MemoryStream();).
3) An exception occurs and is caught from the invoking classes.
将MemoryStream对象上的引用因此丢失。这种情况是否需要try/finally-block(或使用语句)?
只想说倭黑猩猩是真棒失败会发生什么。 – Dave 2010-11-16 15:29:27