🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#2734
From: Dan Mayo
Date: Fri, 19 Jan 2007 14:32
20 lines
2077 bytes
 From the help file:
"Note:	When working with form objects, do not explicitly call the Free 
or Destroy method to free them. Instead, use the Release method, which 
waits until all event handlers have finished executing."

Does this mean I should call "theDialog->Release();" rather than "delete 
theDialog;"?

Reading the "Release()" function call help the note appears 
contradictory to the TForm() section:

"Note:	Release returns immediately to the caller. It does not wait for 
the form to be freed before returning."

So does Release() wait for everything to be done first before returning 
to the next line in code?  Do I need to call both Release() and then 
delete?  Is there something I should do to make sure that Release() has 
finished prior to calling delete?

Dan
Technical Details
Message-ID: <45b0d69a$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!63.218.45.10!nx01.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <45afcda9$1@newsgroups.borland.com> <45afd2ea$1@newsgroups.borland.com> <45afd751$1@newsgroups.borland.com> <45afe953$1@newsgroups.borland.com> <45aff139$1@newsgroups.borland.com> <rgh1r2ln049empurv72i8uith6amj1hl4c@4ax.com> <45b0d38c@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
Date: Fri, 19 Jan 2007 08:32:30 -0600
From: Dan Mayo <dmayo@dickey-john.com>
User-Agent: Thunderbird 1.5.0.9 (Windows/20061207)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Creating new TForm causes 'Out of Resources' error on WinXP
References: <45afcda9$1@newsgroups.borland.com> <45afd2ea$1@newsgroups.borland.com> <45afd751$1@newsgroups.borland.com> <45afe953$1@newsgroups.borland.com> <45aff139$1@newsgroups.borland.com> <rgh1r2ln049empurv72i8uith6amj1hl4c@4ax.com> <45b0d38c@newsgroups.borland.com>
In-Reply-To: <45b0d38c@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 216.174.165.174
Message-ID: <45b0d69a$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1169217178 216.174.165.174 (19 Jan 2007 06:32:58 -0800)
Lines: 20
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!63.218.45.10!nx01.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail