Can someone tell me what the UnmanagedMemoryStream
class is used for?
I am not able to figure out how and when this class could be useful?
Using the UnmanagedMemoryStream allows you to read an unmanaged stream without copying everything into the managed heap first, therefore it's less memory intensive when dealing with unmanaged streams. This also allows you to get around memory limitations if you are dealing with a lot of data.
Edit: Note that there is a 2GB limitation with MemoryStream, so you have to use the UnmanagedMemoryStream if you exceed this limitation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With