Article View: borland.public.cppbuilder.internet.socket
Article #1834IdHTTP in a thread crashes when using CodeGuard
From: tsokas
Date: Tue, 10 Oct 2006 07:25
Date: Tue, 10 Oct 2006 07:25
36 lines
1997 bytes
1997 bytes
Hi all,
I'm trying to use the TIdHTTP component in a thread like this:
void __fastcall TMyThread::Execute()
{
TIdHTTP* HTTP = new TIdHTTP(NULL);
AnsiString dummy = HTTP->Get("http://some_url");
delete HTTP;
}
//---------------------------------------------------------------------------
in main form I use:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
TMyThread* thread;
for (int i=0; i<50; i++)
{
thread = new TMyThread();
thread->Resume();
}
}
//---------------------------------------------------------------------------
Then, during runtime (I use CodeGuard) it pops an
EOutOfMemory exception and then it prompts to line "AnsiString dummy =
.......".
Is it some incompatibility between Indy and CodeGuard? Or CodeGuard
just messes
things when going multi-threaded?...
Thanks
Nicolas
Technical Details
Message-ID:
<1160465153.402484.273810@h48g2000cwc.googlegroups.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!h48g2000cwc.googlegroups.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11508e,b248989b16d7f878,start X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news2.google.com!postnews.google.com!h48g2000cwc.googlegroups.com!not-for-mail From: tsokas@gmail.com Newsgroups: borland.public.cppbuilder.internet.socket Subject: IdHTTP in a thread crashes when using CodeGuard Date: 10 Oct 2006 00:25:53 -0700 Organization: http://groups.google.com Lines: 37 Message-ID: <1160465153.402484.273810@h48g2000cwc.googlegroups.com> NNTP-Posting-Host: 194.177.215.42 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1160465158 9578 127.0.0.1 (10 Oct 2006 07:25:58 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 10 Oct 2006 07:25:58 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: h48g2000cwc.googlegroups.com; posting-host=194.177.215.42; posting-account=LB_1bg0AAABl0H9GiltpD-YjI3JGPk1V