Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Possible memory leak with Ti.Network.createHTTPClient on Android?

$
0
0

With alloy I do this when clicking a button:

Alloy.createController('xhrTest').getView().open();
In xhrTest.js I do this (as the only thing):
var url = "http://www.appcelerator.com";
var xhr = Ti.Network.createHTTPClient();
xhr.onload = function(e)
{
    for(var i in xhr)
    {
        Ti.API.info(i);
    }
    xhr = null;
};
xhr.onerror = function(e)
{
    Ti.API.debug(e.error);
    xhr = null;
};
xhr.open("GET", url);
xhr.send();
On iOS instruments shows that the TiNetworkHTTPClientProxy always gets killed. But on Android doing this repeatedly results in a growing heap size when watching what happens in Android Monitor. Am I doing something wrong or is this a bug in Titanium?

Using Alloy 1.5.1, SDK 3.5.1 and testing on a real Galaxy S3.


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>