Home / Function/ cleanupDeps() — vue Function Reference

cleanupDeps() — vue Function Reference

Architecture documentation for the cleanupDeps() function in watcher.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  f38f69bd_ced9_dfe2_9765_93fb59cbed89["cleanupDeps()"]
  c595e491_455c_5f96_1a90_ed59c627158b["get()"]
  c595e491_455c_5f96_1a90_ed59c627158b -->|calls| f38f69bd_ced9_dfe2_9765_93fb59cbed89
  12ec28f6_876b_9f0a_7041_d93bca97acc0["cleanupDeps()"]
  f38f69bd_ced9_dfe2_9765_93fb59cbed89 -->|calls| 12ec28f6_876b_9f0a_7041_d93bca97acc0
  a2557d53_306b_b31d_8451_9b748ce8f04d["removeSub()"]
  f38f69bd_ced9_dfe2_9765_93fb59cbed89 -->|calls| a2557d53_306b_b31d_8451_9b748ce8f04d
  style f38f69bd_ced9_dfe2_9765_93fb59cbed89 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/core/observer/watcher.ts lines 174–190

  cleanupDeps() {
    let i = this.deps.length
    while (i--) {
      const dep = this.deps[i]
      if (!this.newDepIds.has(dep.id)) {
        dep.removeSub(this)
      }
    }
    let tmp: any = this.depIds
    this.depIds = this.newDepIds
    this.newDepIds = tmp
    this.newDepIds.clear()
    tmp = this.deps
    this.deps = this.newDeps
    this.newDeps = tmp
    this.newDeps.length = 0
  }

Domain

Subdomains

Called By

Frequently Asked Questions

What does cleanupDeps() do?
cleanupDeps() is a function in the vue codebase.
What does cleanupDeps() call?
cleanupDeps() calls 2 function(s): cleanupDeps, removeSub.
What calls cleanupDeps()?
cleanupDeps() is called by 1 function(s): get.

Analyze Your Own Codebase

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

Try Supermodel Free