As MemoryStream is an unmanaged resource does it always have to be disposed?
Given:
1) A method is invoked.
2) A MemoryStream object is created (Mem
In general, all disposable objects must always be disposed.
However, MemoryStream doesn't actually need to be disposed, since it doesn't have any unmanaged resources. (It's just a byte[] and an int)
The only reason it's disposable in the first place is that it inherits the abstract Stream class, which implements IDisposable.
Note that every other stream must be disposed.