Is XMLHttpRequest() object garbage collected?

Discussing Html . Code , Software , other

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 8
Joined: Wed Jan 28, 2015 2:16 am

Thu Jan 29, 2015 3:44 am

To obtain some data from a PHP server I created a new XMLHttpRequest() object then I used its methods open() and send(). Searching forward on site I understood that this object is not automatically subjected to garbage collection process. On the other hand I've seen a lot of examples on how to create an XMPHttpRequest() object and none for destroy it. I have or I have not to terminate myself this object?
php-forum Fan User
php-forum Fan User
Posts: 73
Joined: Wed Jun 12, 2013 9:30 pm

Thu Apr 07, 2016 3:39 am


If an XMLHttpRequest t object must not be garbage collected if its state is either opened with the send () flag set, headers received, or loading.
If an XMLHttpRequest object is garbage collected while its connection is open, the user agent must terminate the request.

Post Reply