Open peter-o opened 7 years ago
The async pipe has had memory leaks in the past, I'd try and rule that out as well.
The problem is that it works fine when I don't use the offline wrapper.
So simply using angularfire2
and there's no memory problems?
Yes.
@peter-o without the offline wrapper means..? Please explain I'm facing same issue!
There is not much to explain - I haven't resolved that issue yet. Basically, everything works fine until I add angularfire2-offline so it just confirms that the memory leak is not caused by any other component in my project. Let me know if you find the solution - I'll have to get back to it pretty soon, so any tips are very welcome.
I'm currently implementing Ionic2 app with this wrapper and it seems to cause issues with memory usage (fully explained here: https://stackoverflow.com/questions/46086610/ionic2-angularfire2-offline-memory-leak) It looks like every update of the object on the list increases the memory usage by over 1MB which leads to memory leak and app crash on android device. I'm updating each item using following code:
this.db.object("/path/to/list/objectKey").update(newData);
At the same time, I have a list (AfoListObservable) displayed on the screen with async pipe so I'm not sure if the issue is caused by the update itself or because the list is refreshed. The list is created like this:var list = this.db.list("/path/to/list")
The list is not huge (~40 objects when I tested it) but the app can easily use over 100MB after just a few minutes of using it (strting from ~35MB). Has anyone experienced similar issues before?