iOS $http json Memory Leak

Hi everyone,

I have an issue with the $http service, not only related to ionic.
Everytime I make an Ajax call to a server to retrieve some JSON data. The memory on iOS increase (you can see it with Xcode). At some point, the memory is too high and the app just crash.
Is there a way to avoid this? Without using a cache system?

You can easily reproduce this. Init a new ionic project and make a $http.get() call. (At this uri for example http://fr.openfoodfacts.org/api/v0/produit/3029330003533.json ).

This behavior occur without ionic, it’s an angular issue, but I ask here if someone have a solution.
I haven’t try to reproduce it on a android device yet

Thanks
Lucas

Having this issue as well.

Don’t have a solution for your problem, but it is an interesting question. I found this article it might help: http://www.codeproject.com/Articles/882966/Fixing-Memory-Leaks-in-AngularJS-and-other-JavaScr

Very interesting article.

I found this one : How Big is TOO BIG for JSON? - Josh Zeigler
Maybe big json cause a too important increase of the memory, so it’s disturb the life cycle of the framework and it can’t use the garbage collector properly… I don’t know, it’s weird.

I’m facing exactly the same problem. Did you find any solutions or a work around to this problem?