Is XMLHttpRequest() object garbage collected?

A

Anonymous

Guest
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 w3.org 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?
 
Hi,


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.

Thanks
 
Back
Top