views:

32

answers:

2

ajax tutorial on w3school at http://www.w3schools.com/ajax/ajax_database.asp

In this function (function GetXmlHttpObject()), it creates a object:

 new XMLHttpRequest(); or new ActiveXObject("Microsoft.XMLHTTP");

but it doesn't delete this object after getting respons from server.

Are there memory leaks ?

+1  A: 

It's ok - Garbage Collection will pick it up for you.

David
BTW, still that ajax tutorial on w3school at http://www.w3schools.com/ajax/ajax_database.asp, on the ASP page, response.expires=-1, is that important?
Jason
+1  A: 

The garbage collector will take care of it once it is no longer referenced.

Darin Dimitrov