Is there a way to just clear all memory in c sharp ?
For example my program is being run one time and it has filled an array.
Is there a function which could clean all memory before the 2nd run so that I do not need to clear all variables ?
Edit: Including text of OP's answer below
I am using libcurl in my program. I click run, libcurl fetches one page and program stops. When I click run button again (Without stopping to debug) libcurl never fetch any webpage again. Using libcurl in made functions for clearing memory does not work so I taught why not clear all memory if possible.
If I restart program then webpage is being fetched successfully first time. I actually stop everything - All threads, clear all variables but nothing works
GC.Collect() did not help either. Looking for solution