Resource Management -- Preventing Crashes
- From: "wxforecaster" <wxforecaster@xxxxxxxxx>
- Date: Tue, 9 Jan 2007 22:33:14 -0600
I've been searching long and hard for a document that discusses the
following, but to no avail.
I'm sure we've all dealt with programs which have forms that can be
continuously spawned as separate windows -- take Internet Explorer and the
"Ctrl-N" shortcut for example.
At some point, your computer will fail to paint objects, forms, etc... and
then ultimately lock up.
My question is with respect to this ultimate failure of repainting. What is
this a function of? RAM? Graphical RAM? User resources? GDI resources?
something else?
How do you measure the upper bound acceptable limit of whatever this is? Is
there a value that common VB controls each use? How about device contexts?
Bottom line...I have an application with a form that I honestly didn't think
had that much *stuff* on it (a couple picture boxes, a toolbar, some
buttons, background DCs to increase paint time). When I load 1 or 2 forms,
no problem. When I spawn 3-4 of these forms, the computer begins to go
downhill with failures mentioned above. In otherwords, what factor(s)
prevent me from loading 5 forms or 50 forms and how can that be measured so
corrective action can be taken.
With 1GB of RAM and 128MB of video RAM, I'm concerned that I've done
something terribly wrong. The code has been thoroughly checked and tested
with a GDI resource tracker and it is 100% leak free. I used the
GuiResTracer which shows GDI and USER objects to test for leaks, but that
doesn't help me understand what 1 unit of these objects is equal to, or what
the upper limit is, etc...
Evan
.
- Follow-Ups:
- Re: Resource Management -- Preventing Crashes
- From: Thorsten Albers
- Re: Resource Management -- Preventing Crashes
- Prev by Date: Re: AntiAlias Line Optimization
- Next by Date: Re: Resource Management -- Preventing Crashes
- Previous by thread: GDI leak
- Next by thread: Re: Resource Management -- Preventing Crashes
- Index(es):