Skip to content

How to clean up data in components to prevent memory leaks? #428

Answered by Tao-VanJS
OscarCookeAbbott asked this question in Q&A
Discussion options

You must be logged in to vote

Ah... this is indeed tricky.

For @sirenkovladd's specific example, this can be fixed with https://jsfiddle.net/6eump4rj/. Basically for a derivation defined in a function to be properly GC-ed, that function needs to be a standard component (which means the function needs to return a DOM element).

I understand this is a little bit error-prone. I will keep this issue on mind to see improvement can be made.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@OscarCookeAbbott
Comment options

@sirenkovladd
Comment options

@Tao-VanJS
Comment options

Answer selected by OscarCookeAbbott
@Tao-VanJS
Comment options

@OscarCookeAbbott
Comment options

@OscarCookeAbbott
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants