I'm downloading video files through a usb device. The program stores files in a byte[]
array and then writes to new file using WriteAllBytes
. But after the completion, System Memory is still in use even after I assign null
to byte[]
.
Here is the code:
byte[] myByte = session.DownloadFile(InFile);
File.WriteAllBytes(OutFile, myByte);
myByte = null;
session.DownloadFile()
is my own class it all works fine just a memory issue. The program crashes if memory used by program exceeds 1GB.