EldinZenderink / SimpleIRCLib

A lightweight, simple to use and implement, IRC library with support for DCC download (no upload)
MIT License
14 stars 14 forks source link

Large(?!) DCC Download - OutOfMemoryException #10

Open spreedated opened 4 years ago

spreedated commented 4 years ago

Trying to download large files, which means more than ~100MB ends in an Out of memory exception. A possible cause is the following:

image

A list of Byte array which reaches it's limit of 1GB/1024MB.

LegendaryB commented 4 years ago

I'm not using this library and don't know the exact code but I think this is a easy fix. Just use streams to write to a file instead of reading all to a list and then writing it to a file.