disposeTensorflowModel function domain exported ✗ 0.0%
Last updated: 2026-03-02T11:04:51.015Z
Metrics
LOC: 9
Complexity: 2
Params: 0
Coverage: 0.0% (0/6 lines, 0x executed)
Signature
disposeTensorflowModel(): : void
Summary
Disposes the TF.js model and all in-memory state, freeing GPU/WASM memory. Call when the classifier will no longer be used in this context (e.g., service worker suspending or extension unloading).
Source Code
export function disposeTensorflowModel(): void {
if (_pretrained) {
_pretrained.model.dispose();
_pretrained = null;
_pretrainedLoadPromise = null;
_learnedVectors = [];
log.debug("Modelo TF.js e memória associada liberados.");
}
}
No outgoing dependencies.
Impact (Incoming)
| Source | Type |
|---|---|
| handleMessage | uses |