Ion-refresher possible memory leak


Hi guys, I just started using the DevTools memory profiler in Chrome and I’ve come across something I can’t explain (ionic 3, angular 5)

If we bind the enabled property of an ion-refresher and we toggle this value, the profiler shows an increase of exactly 2 “Listeners” after each toggle. Similarly, the JS heap increases around 50 kB on one each toggle. But why does it keep adding up? I would probably expect the value to increase and decrease or at least stay constant. First of all, I don’t understand why more and more listeners are added, and secondly, it looks like we will run out of memory at some point, or am I missing something?

Can anyone explain this?

Video link: (30secs; 800 kB)

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

local packages:

@ionic/app-scripts : 3.2.0
Ionic Framework    : ionic-angular 3.9.2


Node : v8.11.2
npm  : 6.1.0
OS   : macOS High Sierra


backend : pro


can you share your current code? this sounds interesting


Hi morphist, yes I can share the project.
Here’s a git repo

But basically you can see all the code I have on the left side in the video.
It’s the blank starter project (ionic start appname blank) where I’ve isolated the refresher completely.