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

Prevent reactive variables from retaining unwatched caches. #7279

Merged
merged 2 commits into from
Nov 3, 2020

Commits on Nov 2, 2020

  1. Prevent reactive variables from retaining unwatched caches.

    Each reactive variable must remember any caches previously involved in
    reading its value, so those caches can be notified if/when the variable
    value is next modified.
    
    To prevent reactive variables from retaining references to caches that no
    longer need to be notified, we preemptively remove the cache from the
    memory of all of its associated reactive variables whenever all of its
    watches are cancelled, since not having any active cache.watches means
    cache.broadcastWatches has nothing to do.
    
    Should prevent memory leaks when many caches are created and discarded by
    the same process, as in the SSR use case described in #7274.
    benjamn committed Nov 2, 2020
    Configuration menu
    Copy the full SHA
    e843552 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a4c29e7 View commit details
    Browse the repository at this point in the history