C# application using too much ram
<p>stackoverflow. I've written a application in C# (a raytracer). Problem is not with raytracer but with ray usage. Application keep consuming more ram over time.</p>

<p>Ram usage while not raytracing : start with 10mb goes up and up</p>

<p>Ram usege while raytracing : start 80mb then 120mb and up, if resolution is big
this number is up to 500mb.</p>

<p>I looked to VS Diagnostics tool and see application garbage collection is like 10 gc in 1 minute. This number is even bigger while application is raytracing. Raytracer returns a gigantic pixel array. I set pixel array to null after raytracing but application ram stucks in a range of 500-600 mb ram.</p>

<p>Are there any options to collect more garbage or free ram?</p>

<p><strong>EDIT</strong>
This is a WinForms application, not WPF or something.</p>