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
  e0646fc5_8798_3487_e9e9_047d883eae08["removeSub()"]
  6468b0c5_2298_434f_d55a_c498376ea8cd["Dep"]
  e0646fc5_8798_3487_e9e9_047d883eae08 -->|defined in| 6468b0c5_2298_434f_d55a_c498376ea8cd
  55c27de4_ac93_74ee_727e_97a8a8b978d4["cleanupDeps()"]
  55c27de4_ac93_74ee_727e_97a8a8b978d4 -->|calls| e0646fc5_8798_3487_e9e9_047d883eae08
  be270b49_47e8_8f99_8878_880772c2e703["teardown()"]
  be270b49_47e8_8f99_8878_880772c2e703 -->|calls| e0646fc5_8798_3487_e9e9_047d883eae08
  style e0646fc5_8798_3487_e9e9_047d883eae08 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