Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: SSR memory leak #572

Merged
merged 1 commit into from
Apr 30, 2019
Merged

fix: SSR memory leak #572

merged 1 commit into from
Apr 30, 2019

Conversation

Pindar
Copy link
Contributor

@Pindar Pindar commented Apr 27, 2019

by moving subscribeDataChanging calls into beforeMount according to
https://ssr.vuejs.org/guide/universal.html#component-lifecycle-hooks

However, because the destroy hooks will not be called during SSR, the timers will stay around forever. To avoid this, move your side-effect code into beforeMount or mounted instead.

Signed-off-by: 131621+Pindar@users.noreply.github.com

…eMount

Signed-off-by: Simon Dittlmann <131621+Pindar@users.noreply.github.com>
@codecov-io
Copy link

Codecov Report

Merging #572 into dev will decrease coverage by 0.21%.
The diff coverage is 86.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #572      +/-   ##
==========================================
- Coverage   96.38%   96.17%   -0.22%     
==========================================
  Files          10       10              
  Lines         775      784       +9     
==========================================
+ Hits          747      754       +7     
- Misses         28       30       +2
Impacted Files Coverage Δ
src/mixin.js 94.52% <86.66%> (-2.36%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9e12e4d...ed2dbba. Read the comment docs.

@kazupon
Copy link
Owner

kazupon commented Apr 30, 2019

Thank you for your PR!
Good catch!
SSR docs is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants