I wrote a piece of code that is going to perform a request to Facebook.
Now i wrapped this code into a infinite loop which is going to send those requests every 10 seconds using timeouts.

var poll = function(socket, userProvider) { var lastCallTime = new Date(); var polling = true; // The stream itself, non blocking function performPoll() { var results = feed(function (err, data) { lastCallTime = new Date(); // PROCESS DATA // Check new posts if (polling) { setTimeout(performPoll, 1000 * 10); } }); }; // Start infinite loop performPoll();};The feed(cb) is just going to call a request to Facebook requesting data, this works 100% and does what i want it to do, the only problem that i am having now is that this piece of code is keeping to increase my memory usage. After a few minutes it increased by 50MB already (From 50 -> 100).
Is there anybody that can help me identify the cause of this?

View Solution