🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #1835

Re: IdHTTP in a thread crashes when using CodeGuard

#1835
From: Remy Lebeau (TeamB)
Date: Tue, 10 Oct 2006 08:23
19 lines
1603 bytes
<tsokas@gmail.com> wrote in message
news:1160465153.402484.273810@h48g2000cwc.googlegroups.com...

> I'm trying to use the TIdHTTP component in a thread like this:

You are not protecting the thread from exceptions.  You should wrap the call
to Get() in a try..catch or try..finally block, or use the STL's auto_ptr
class, to ensure that the TIdHTTP is freed properly even when Get() throws
an exception when the download fails.

> Then, during runtime (I use CodeGuard) it pops an
> EOutOfMemory exception and then it prompts to line "AnsiString dummy =
> .......".

How much data are you actually downloading from the URL?


Gambit
Technical Details
Message-ID: <452b5ac8$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!news.albasani.net!reader.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail
References: <1160465153.402484.273810@h48g2000cwc.googlegroups.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,b248989b16d7f878
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <1160465153.402484.273810@h48g2000cwc.googlegroups.com>
Subject: Re: IdHTTP in a thread crashes when using CodeGuard
Date: Tue, 10 Oct 2006 01:23:03 -0700
Lines: 21
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: 69.169.4.232
Message-ID: <452b5ac8$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1160469192 69.169.4.232 (10 Oct 2006 01:33:12 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!news.albasani.net!reader.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail