🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #2728

Re: Creating new TForm causes 'Out of Resources' error on WinXP

#2728
From: Remy Lebeau (TeamB)
Date: Thu, 18 Jan 2007 20:00
37 lines
2069 bytes
"Dan Mayo" <dmayo@dickey-john.com> wrote in message
news:45afcda9$1@newsgroups.borland.com...

> I have a fairly simple form that I dynamically create throughout a
> program I am working on.  However, every once in awhile the
> program crashes due to a 'Out of Resources' error (according to
> Windows)

GDI resources are very limited.

> however, when I log the amount of memory in use and available;
> there is plenty of physical memory yet.

Available physical memory is different then available GDI resources.

> Using a tool to help discover where the code was dying, I found out
> it was on the 'new' call when I dynamically create the new form.
Shortly
> after creating the form and temporarily displaying some things I
always
> close the form and then call the delete operator.

Are you absolutely sure that 'delete' is always being called?  In any
case, how much UI resources are you already using before creating the
new form instance?

> Why am I getting the "Out of Resources" error?

Because you are running low on available resources ;-)

> The form only contains a TButton, a TCaption, and a TProgressBar.

But what does the rest of your UI contain?


Gambit
Technical Details
Message-ID: <45afd2ea$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <45afcda9$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,81568e00a202778e
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <45afcda9$1@newsgroups.borland.com>
Subject: Re: Creating new TForm causes 'Out of Resources' error on WinXP
Date: Thu, 18 Jan 2007 12:00:20 -0800
Lines: 39
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 75.83.34.171
Message-ID: <45afd2ea$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1169150698 75.83.34.171 (18 Jan 2007 12:04:58 -0800)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail