J
Jonathan Boivin
Hi,
I've got some problems with loading bills using a bill usercontrol I built.
If I load all current bills in my test environment (156) everything is fine
once, but repeating the operation (which clear all the bills and reshow all
of them) four to five times and I get a Error creating window handle. I
investigated on all of this, a lot, and still I'm not able to find where
this problem come from. I know that the GDI objects column in the task
manager gives me growing and growing number up to 10000 max and then crash.
http://www.cints.net/clinica/LoadFactures.jpg
http://www.cints.net/clinica/LoadFactures-Opened.jpg
I put there two pictures which shows you how looks like the form which cause
me the problem (this is a MDI application, i dont know if it's important).
The second one brings on details about hidden part of the bill usercontrol.
This is to give you an idea about how many controls there is on this
usercontrol, but be advised that I recently transform everything possible
into Graphics.DrawString calls which use Brushes.Black as brush and a font
which I dispose or pens which are disposed too. This saved me on the number
of handle created, but still,
there's a lot and more, I got a problem with those GDI objects.
So, let me show you numbers I collected from the task manager.
USER Objets / GDI Objets
100/178=Main window loaded
149/194=Bills window loaded
4522/1817=All bills loaded (156) (1st time)
4616/3432=All bills loaded (156) (2nd time)
4710/5047=All bills loaded (156) (3rd time)
390/5042=Bills window closed
100/178=Main window loaded
149/192=Bills window loaded
102/186=Bills window closed
As you can see,these numbers are alarmous (lol, to me though). The number of
GDI objects never goes down significativily. Even opening the window only
and closing doesn't make the number going back to normal. Let's consider
that the numbers of the last three lines are normal (if I able to fix the
big one, small one should be easy to find).
I tried to use a profiler, but where nothing helps me find the solution
(because I tried lots of thing, I ameliorate too during the process).
So my questions are : How could I trace these GDI objects in my code ? Is
there a list of GDI objects type (complete) which could tells me what I
didn't disposed (because i'm about to dispose strings.. lol) (like I know
that Pen, brushes, bitmap, graphics as to be disposed)?
Thank you for reading up to there. I'm sorry for mistakes, I don't use my
english often.
One of your french quebeceer friend who desparatly needs help!
I've got some problems with loading bills using a bill usercontrol I built.
If I load all current bills in my test environment (156) everything is fine
once, but repeating the operation (which clear all the bills and reshow all
of them) four to five times and I get a Error creating window handle. I
investigated on all of this, a lot, and still I'm not able to find where
this problem come from. I know that the GDI objects column in the task
manager gives me growing and growing number up to 10000 max and then crash.
http://www.cints.net/clinica/LoadFactures.jpg
http://www.cints.net/clinica/LoadFactures-Opened.jpg
I put there two pictures which shows you how looks like the form which cause
me the problem (this is a MDI application, i dont know if it's important).
The second one brings on details about hidden part of the bill usercontrol.
This is to give you an idea about how many controls there is on this
usercontrol, but be advised that I recently transform everything possible
into Graphics.DrawString calls which use Brushes.Black as brush and a font
which I dispose or pens which are disposed too. This saved me on the number
of handle created, but still,
there's a lot and more, I got a problem with those GDI objects.
So, let me show you numbers I collected from the task manager.
USER Objets / GDI Objets
100/178=Main window loaded
149/194=Bills window loaded
4522/1817=All bills loaded (156) (1st time)
4616/3432=All bills loaded (156) (2nd time)
4710/5047=All bills loaded (156) (3rd time)
390/5042=Bills window closed
100/178=Main window loaded
149/192=Bills window loaded
102/186=Bills window closed
As you can see,these numbers are alarmous (lol, to me though). The number of
GDI objects never goes down significativily. Even opening the window only
and closing doesn't make the number going back to normal. Let's consider
that the numbers of the last three lines are normal (if I able to fix the
big one, small one should be easy to find).
I tried to use a profiler, but where nothing helps me find the solution
(because I tried lots of thing, I ameliorate too during the process).
So my questions are : How could I trace these GDI objects in my code ? Is
there a list of GDI objects type (complete) which could tells me what I
didn't disposed (because i'm about to dispose strings.. lol) (like I know
that Pen, brushes, bitmap, graphics as to be disposed)?
Thank you for reading up to there. I'm sorry for mistakes, I don't use my
english often.
One of your french quebeceer friend who desparatly needs help!