Home / Function/ dispose() — astro Function Reference

dispose() — astro Function Reference

Architecture documentation for the dispose() function in content-layer.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  628b9ea0_b534_722a_c532_464eb65c9de7["dispose()"]
  4a6efe25_e6e4_25af_3955_aede0d8f5983["ContentLayer"]
  628b9ea0_b534_722a_c532_464eb65c9de7 -->|defined in| 4a6efe25_e6e4_25af_3955_aede0d8f5983
  2a8b79e7_7c11_9c4a_89f5_488193135e27["contentLayerSingleton()"]
  2a8b79e7_7c11_9c4a_89f5_488193135e27 -->|calls| 628b9ea0_b534_722a_c532_464eb65c9de7
  style 628b9ea0_b534_722a_c532_464eb65c9de7 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/content/content-layer.ts lines 96–100

	dispose() {
		this.#queue.clear();
		this.#unsubscribe?.();
		this.#watcher?.removeAllTrackedListeners();
	}

Subdomains

Frequently Asked Questions

What does dispose() do?
dispose() is a function in the astro codebase, defined in packages/astro/src/content/content-layer.ts.
Where is dispose() defined?
dispose() is defined in packages/astro/src/content/content-layer.ts at line 96.
What calls dispose()?
dispose() is called by 1 function(s): contentLayerSingleton.

Analyze Your Own Codebase

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

Try Supermodel Free