From: Stéphane BARBARAY Date: Wed, 3 Feb 2016 15:39:17 +0000 (+0100) Subject: Update enqueue.md X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=d0739155d521d20151f8a0b401c586e6325babbd;p=mdref%2Fmdref-http Update enqueue.md Added a note about the need to call getResponse() (or reset) when using callback and sending many requests to keep memory as low as possible --- diff --git a/http/Client/enqueue.md b/http/Client/enqueue.md index b5a6d75..1214996 100644 --- a/http/Client/enqueue.md +++ b/http/Client/enqueue.md @@ -3,8 +3,12 @@ Add another http\Client\Request to the request queue. If the optional callback $cb returns true, the request will be automatically dequeued. +> ***Note:*** +> The http\Client\Response object resulting from the request is always stored in an internal storage, __even__ when callback is used, because of that, the memory may grow up significantly if you send many many requests using the same http\Client instance... In that case, to keep memory as low as possible, it is advised to call http\Client::getResponse() in the callback or to call http\Client::reset() after each http\Client::send() to free some ressources. + See http\Client::dequeue() and http\Client::send(). + ## Params: * http\Client\Request $request