Memory leak - ChildScope leaks when ionNavButtons directive used

Hello everyone,

I’ve found that scope is leaking when view has ionNavButtons directive on it. I’ve made sample application which proves the leaking.

Application basically consists of one master view and two detail views (leak and noleak). For simplicity both detail views has the same controller “CommonCtrl” which allocates big array (32Mb), and also they have the same templates except the view whose scope leaks has one ionNavButtons directive. Try the application with Chrome Dev Tools.

  1. NO LEAKING SCENARIO
    open list view
    snapshot
    open No leak view
    controller allocates 32Mb
    go back
    snapshot
    FINAL RESULT: 32Mb is deallocated, and child view is disposed

  2. LEAKING SCENARIO
    open list view
    snapshot
    open Leak view
    controller allocates 32Mb
    go back
    snapshot
    FINAL RESULT: view scope remains in heap, and 32Mb is not deallocated!

I appologize if this forum is not the right place for reporting bugs, but I would appreciate if someone has workaround how to avoid this.

NOTE: I’m starting Chrome with following command line parameters: --js-flags="–nocrankshaft --nouse-ic --expose-gc"

Here is download link of sample application with minimum code to isolate scenario: LINK