@vidhyasagarthakur/memory-leak
v0.1.2
Published
Memory leak detector plugin for DevToolkit (Phase 3)
Readme
@vidhyasagarthakur/memory-leak
Memory leak detection plugin for DevToolkit.
Status
Phase 3 implemented (EventTarget listener instrumentation + leak report emission available).
Features
- Track event listeners and clean-up issues
- Emit leak indicators and summaries
Install
pnpm add @vidhyasagarthakur/memory-leak @vidhyasagarthakur/coreCurrent Usage
import { createToolkit } from "@vidhyasagarthakur/core";
import { memoryLeakPlugin } from "@vidhyasagarthakur/memory-leak";
const toolkit = createToolkit({
plugins: [memoryLeakPlugin({ warnThreshold: 2 })],
});
toolkit.on("memory:leak-warning", (warning) => {
console.warn(warning.description);
});
toolkit.on("memory:report", (report) => {
console.log(report.listenerImbalanceCount);
});Events
memory:leak-warningmemory:report
License
MIT
