I have a control that contains a System.Windows.Forms.TrackBar. I was setting its maximum value to ~200,000,000. When I did this, the control required 800MB of memory. Reducing the maximum value to 2,000,000 used a more reasonable amount of memory.
//trackBar.Maximum = 210554060; // uses ~800MB of memory
trackBar.Maximum = 1000000; // uses a small amount of memory
Is this a bug in the Windows control? Or am I asking the trackbar to do something unreasonable?
Update: I've created a new Windows Form project with nothing but a trackbar on the form. I set the maximum value to 200,000,000. I set the TickFrequency and changes so that there are not millions of ticks and change steps.
When I do this, the application uses over 800MB of memory. I am using .NET Framework 4.
.
Update I found somewhat of an explanation for this problem: http://www.tech-archive.net/Archive/DotNet/microsoft.public.dotnet.framework.windowsforms.controls/2006-12/msg00015.html
Adding link to test project https://www.dropbox.com/s/nh6jsymw05feoqn/testingTrackbar.zip?m