Skip to content
This repository was archived by the owner on Dec 31, 2024. It is now read-only.

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

Verified

This commit was signed with the committer’s verified signature.
vcunat Vladimír Čunát
…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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants