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
  a2557d53_306b_b31d_8451_9b748ce8f04d["removeSub()"]
  f38f69bd_ced9_dfe2_9765_93fb59cbed89["cleanupDeps()"]
  f38f69bd_ced9_dfe2_9765_93fb59cbed89 -->|calls| a2557d53_306b_b31d_8451_9b748ce8f04d
  3d03878c_4a3a_4d94_b9f5_3c7287192b05["teardown()"]
  3d03878c_4a3a_4d94_b9f5_3c7287192b05 -->|calls| a2557d53_306b_b31d_8451_9b748ce8f04d
  style a2557d53_306b_b31d_8451_9b748ce8f04d 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.
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