I have a crawler application (with C#) that downloads pages from web . The application take more virtual memory , even i dispose every object and even use
.
This , have 10 thread and each thread has a socket that downloads pages . In each thread , i have a
that store content of page , and have an
that i store in it , content of page in string . I have a Sytem.Timer that every 3 second chech , if each thread has been stopped , assign it new thread and start it.
I use dispose method and even use
in my application , but in 3 hour my application take 500 MB on virtual memory (500 MB on private bytes in Process explorer) . Then my system will be hang and i should restart my pc .
would it be rude , If i assign my byte[] and string to null ?
Is there any way that i use to free virtual memory ?
Thanks .
Code:
GC.Collect()
This , have 10 thread and each thread has a socket that downloads pages . In each thread , i have a
Code:
byte[] buffer
Code:
string str_content
I use dispose method and even use
Code:
GC.Collect()
would it be rude , If i assign my byte[] and string to null ?
Is there any way that i use to free virtual memory ?
Thanks .
Comment