I have a WPF application which has 2 threads in addition to the Main UI thread. The second thread loops each item(url collection) and loads the url to web browser and on webbrowser page loaded the third thread is loaded. The application is throwing memory out of bound error when it reaches 40-50 url loads.

I have tracked the memory allocation using the visual studio performance tool. The tool is having item of object type "+" and some empty entries. I have no idea what this items are I have added a screenshot. Colleagues could you please help me in understanding what could be the cause of this memory issue. Screenshot

I have tried

GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect(); 

this clears the memory but still the application memory usage grows linearly with each record.

0 Answers