Home / Function/ removeSub() — vue Function Reference

removeSub() — vue Function Reference

Architecture documentation for the removeSub() function in dep.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  6dd1ab57_f5b5_94ab_fab6_34852abb2663["removeSub()"]
  485177ad_539e_577c_6503_821a3b761eff["Dep"]
  6dd1ab57_f5b5_94ab_fab6_34852abb2663 -->|defined in| 485177ad_539e_577c_6503_821a3b761eff
  5e45cb10_075f_436d_5803_7d7474a26d26["cleanupDeps()"]
  5e45cb10_075f_436d_5803_7d7474a26d26 -->|calls| 6dd1ab57_f5b5_94ab_fab6_34852abb2663
  f780ff44_85db_e399_d971_8fdf493ab15a["teardown()"]
  f780ff44_85db_e399_d971_8fdf493ab15a -->|calls| 6dd1ab57_f5b5_94ab_fab6_34852abb2663
  style 6dd1ab57_f5b5_94ab_fab6_34852abb2663 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/core/observer/dep.ts lines 47–57

  removeSub(sub: DepTarget) {
    // #12696 deps with massive amount of subscribers are extremely slow to
    // clean up in Chromium
    // to workaround this, we unset the sub for now, and clear them on
    // next scheduler flush.
    this.subs[this.subs.indexOf(sub)] = null
    if (!this._pending) {
      this._pending = true
      pendingCleanupDeps.push(this)
    }
  }

Domain

Subdomains

Frequently Asked Questions

What does removeSub() do?
removeSub() is a function in the vue codebase, defined in src/core/observer/dep.ts.
Where is removeSub() defined?
removeSub() is defined in src/core/observer/dep.ts at line 47.
What calls removeSub()?
removeSub() is called by 2 function(s): cleanupDeps, teardown.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free