Article View: borland.public.cppbuilder.nativeapi
Article #2637Re: Creating new TForm causes 'Out of Resources' error on WinXP
From: Remy Lebeau (TeamB)
Date: Fri, 19 Jan 2007 19:02
Date: Fri, 19 Jan 2007 19:02
24 lines
1856 bytes
1856 bytes
"Dan Mayo" <dmayo@dickey-john.com> wrote in message news:45b0dfca@newsgroups.borland.com... > Is there anything wrong with doing destruction of a form like this? > theForm->Release(); > Application->ProcessMessages(); Technically no, but it is not the right way to free the form in this situation. > I was noticing without ProcessMessages that theForm was still in memory.. That is because the message posted by Release() is not processed, so the form is not freed. > Is there a better way? You already know a better way - use 'delete' instead. There is nothing in your code that warrants the use of Release(). Gambit
Technical Details
Message-ID:
<45b115ae@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!news.glorb.com!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<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> <45b0d69a$1@newsgroups.borland.com> <45b0dfca@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> <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> <45b0d69a$1@newsgroups.borland.com> <45b0dfca@newsgroups.borland.com> Subject: Re: Creating new TForm causes 'Out of Resources' error on WinXP Date: Fri, 19 Jan 2007 11:02:20 -0800 Lines: 26 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: <45b115ae@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1169233326 75.83.34.171 (19 Jan 2007 11:02:06 -0800) Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!news.glorb.com!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail