Hello, I use BackGroundWorker
and ProgressBar
.
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
{
BackgroundWorker worker = sender as BackgroundWorker;
e.Result = MyMethod((int)e.Argument, worker, e);
}
private void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
progressBar1.Value = e.ProgressPercentage;
}
private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
tStripStatus.Text = "operation Ended.";
tStripStatus.ForeColor = Color.Green;
}
In MyMethod I use Dispose()
method for necessary resources.
- While my app is start up, it uses ~10 000 K memory.
- While my app is running, it uses between ~40 000 k - ~ 70 000k memory.
- When operation is completed, it uses ~30 000 k memory.
How can I catch what is using 30 000 k - 10 000 k=~20 000 k memory?