idhttp 多线程 out of memory
BCB2009 indy10
在线程里创建idhttp,并get一段数据,当线程数多的时候会出现out of memory的错误,有人遇到过么
void __fastcall ThGetHttp::Execute(){ TMemoryStream * ms; while (!this->Terminated) { ms = new TMemoryStream; http->Request->Range = IntToStr((int)begin) + "-" + IntToStr((int)end); try { http->Get(fUrl, ms); // 线程数多时这里会报out of memory的错误 } catch (...) { delete ms; break; } delete ms; }}