MemoryStream "out of memory" C #

I have a custom DataObject (Virtual File) implementation here . I have a drag and drop function in the control view (drag and drop the OUT file from the control view without a temporary temp file). This works fine with smaller files, but as soon as the file is larger than 12-15 million, it says that there is not enough memory. there seems to be no memory in the memory stream. What can I do about this? can I somehow split the larger byte [] into several memory streams and collect them into a single file? Any help would be greatly appreciated.

+3
c # memory
source share
1 answer

can somehow split the larger byte [] into several momoryStreams and collect them into a single file?

Yes.

When I had to deal with a similar situation, I built my own thread, which internally used 4mb byte arrays. This "paging" means that he never needs to allocate ONE BIG BYTE, which is a memory stream. Thus, a memory dump stream, create your own stream based on another internal storage engine.

+3
source share

All Articles