由于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.
Run Code Online (Sandbox Code Playgroud)
因此,MemoryStream对象上的引用将丢失.这种情况需要try/finally-block(或using语句)吗?