I am also experiencing a memory leak/issue. I have a bare-bones ion-side-menus style app that is a book. Like this:
<ion-side-menus>
<ion-side-menu-content>
<ion-nav-view name="menuContent">
<!-- section of the book loaded into content -->
</ion-nav-view>
</ion-side-menu-content>
<ion-side-menu side="left">
<-- ul of links -->
</ion-side-menu>
</ion-side-menus>
As I click links in the side menu, the “menuContent” nav-view gets filled with different book pages. The problem is my book pages are “heavy” - each page has 10 Mb to 20 Mb of .m4v video elements along with text. If I quickly click through the side menu to load every page, I can get the memory on my iPhone5 all the way to 500 Mb at which point Xcode force closes the app.
I’ve tried purging the $viewHistory (see code below). This code does work to purge the viewHistory, but it doesn’t solve my memory problem. Here is the code I used to purge the view history each time I swap out a section with a controller:
$rootScope.$viewHistory = {
histories: {
root: {
historyId: 'root',
parentHistoryId: null,
stack: [],
cursor: -1
}
},
backView: null,
forwardView: null,
currentView: null,
disabledRegistrableTagNames: [],
views: {}
};