I am working on ionic 2 app and below are my setup details for android application:-
Cordova CLI: 6.3.1
Ionic Framework Version: 2.0.0-beta.11
Ionic CLI Version: 2.0.0-beta.37
Ionic App Lib Version: 2.0.0-beta.20
OS: Windows 7 SP1
Node Version: v6.3.1
While profiling application using chrome snapshot feature, I have noticed that with every push the component count increases and with pop the component is not been released for garbage collector.
Due to this lots of object are getting created inside memory heap which are not getting released during application life span. I had tried to release property by assigning null to properties of components using
ionViewDidUnload() and ngOnDestroy() methods but still heap size keep on increasing with object getting created inside heap. Number of count of component object keeps on increasing with every time you push a view component on navigation stack.
I have also tried below option:-
Please suggested a way to release memory of an component after its been poped out from navigation stack and release all its properties and objects (Arrays) from heap stack.
Thank you in advance