Here\'s some code that I run on Google Chrome 19.0.1061.1 (Official Build 125213) dev:
Memory Leak
In your first example, you are calling a new instance of XMLHttpRequest() with each interval. In the second one, you instantiate a copy one time and use it throughout the life of the code. That's why in the first example you run out of memory.