Memory leak when navigate to page on ionic framework


#1

Hi. I use Ionic Framework for my hybrid app. I first open login page. If user logins, it goes dashboard page. It is ok. My problem is that navigating between pages. When it goes from login page to dashboard page, memory ge bigger about 20-30 Mb. Then this grows more when continue to navigate pages. Has anyone give me an idea about this?
Thanks in advance.


#2

I’m experiencing similar behaviour with my app (uses a sidemenu). The problem increases with the more DOM elements on the page. Something is not getting cleaned up.

For a baseline, I’ve tested the out-of-the-box sidemenu project (ionic start NewProject sidemenu). Running on android, transitioning between “Browse” and “Playlist” about 10 times increases about .1 MB, each time. Heap Snapshots were taken with Chrome Developer Tools.

Can anyone confirm there is a memory leak with the sidemenu project? v1.3.1


#3

I think this has something to do with the debug mode, for me the memory allocation is reduced when I set prodMode:true:

@App({
..
..
prodMode:true
})'

#4

I use ionic 1.4. Is there a config setting as prodMode in this version ?


#5

Hi @webprofusion

@App({


prodMode:true
})’

where this rows are located in project?
thanks a lot