Article View: borland.public.cppbuilder.nativeapi
Article #9370Re: Thread and memory
From: Steve Aletto
Date: Mon, 19 Jul 2004 14:01
Date: Mon, 19 Jul 2004 14:01
28 lines
1348 bytes
1348 bytes
> Main:
> CMyThread *MyThread = new MyThread();
Shouldn't it be:
CMyThread *MyThread = new CMyThread(true);
> void __fastcall CMyThread::Execute(void)
> {
> if (Terminated) return;
>
> // Process here
> //
>
> FreeOnTerminate = true;
> Terminate();
> }
void __fastcall CMyThread::Execute(void)
{
while (!Terminated)
{
// Process here
}
}
HTH,
Steve.
Technical Details
Message-ID:
<40fbd474@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40fb3d08@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,d35c53850c011fac X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Steve Aletto" <steve_alettoANTI@SPAMhotmail.com> From: "Steve Aletto" <steve_alettoANTI@SPAMhotmail.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <40fb3d08@newsgroups.borland.com> Subject: Re: Thread and memory Date: Mon, 19 Jul 2004 16:01:09 +0200 Lines: 30 Organization: Steve Aletto X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 81.208.124.114 Message-ID: <40fbd474@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1090245748 81.208.124.114 (19 Jul 2004 07:02:28 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail