Closed llaszkie closed 6 years ago
Yeah, sometimes this happens, also i found out it depends on Vue version in some cases, F7 and its router call everything correctly, all components are being destroyed by Vue (beforeDestroy get called), there was also #263 about this, and that time, it was Vue issue. So not sure where to look for it
Let me know if you find anything specific
I've tried switching the Vue version: 2.2.1, 2.5.0, 2.5.16 - no impact. I've also noticed that it's not sometimes, but always.
Dear Vladimir!
I've been able to fix the issue via above changes. The one for framework7-vue
is mostly cosmetic. The crucial are those for framework7. I'm pretty sure that commenting out pageFrom
that was leaking the references is not a final fix 😀, but it would be awesome if you could guide how - and where - clean that reference!
I will test if it is sufficient to cut the reference while chaining new pageFrom
. Stay tuned 😃
but it would be awesome if you could guide how - and where - clean that reference!
Should be done somewhere here, but as you may see, page data is being cleared here:
So, the only what works for me is cutting off the references. I've tried to keep the feature by preserving the last page. The PRs solve the memory leak problem and seems to be an acceptable trade-off for the feature too.
This is a (multiple allowed):
[x] bug
[ ] enhancement
[ ] feature-discussion (RFC)
Framework7 Version: 2.0.7
Framework7-Vue Version: 2.0.7
Platform and Target: Any
Live Link or JSFiddle: play with https://github.com/framework7io/framework7-template-vue-webpack or starter https://jsfiddle.net/nolimits4web/jcwzqovz/
What you did
I have been chasing a memory leak in our framework7-vue based app and my conclusion is that a root cause is in the framework itself. So I was able to reproduce the behaviour with the template app or your fiddle.
Here the steps:
Expected Behavior
No memory leaks while navigating.
Actual Behavior
Check the screenshot too - I've been trying to clean all the listeners I could - but no luck.