G
Guest
We are experiencing heavy GDI object leakage in our application. I narrowed it down to the image lists created by Dev Studio are not being released. Here is the line that seems to leak and how I am testing it:
Line added by DevStudio that is found in InitializeComponent() of a form:
this.DateTimeimageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("DateTimeimageList.ImageStream")));
If I comment out this line (prevents it from loading the images from the resource file), our GDI object count goes from a leak of 412 to 124??? This is how I know:
1. I create the form (I don't even show it).
2. Dispose the form, and set the object to null.
3. GC.Collect(GC.MaxGeneration);
I know this is not our only problem, but I don't understand how this is causing a problem at all. Any ideas on why? Any suggestions on what tools we can use to find the other GDI object leaks? Below is our development environment:
Dev Studio 2002
Framework 1.0 (with latest service pack)
Development in C#
Standard Windows Application
Thanks in advance for the time towards this question.
- Buck
Line added by DevStudio that is found in InitializeComponent() of a form:
this.DateTimeimageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("DateTimeimageList.ImageStream")));
If I comment out this line (prevents it from loading the images from the resource file), our GDI object count goes from a leak of 412 to 124??? This is how I know:
1. I create the form (I don't even show it).
2. Dispose the form, and set the object to null.
3. GC.Collect(GC.MaxGeneration);
I know this is not our only problem, but I don't understand how this is causing a problem at all. Any ideas on why? Any suggestions on what tools we can use to find the other GDI object leaks? Below is our development environment:
Dev Studio 2002
Framework 1.0 (with latest service pack)
Development in C#
Standard Windows Application
Thanks in advance for the time towards this question.
- Buck