[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › LeakDetector

Development-time detection of leaked handles via garbage collection.

## Functions

| Function                                                                                               | Description                                                                                                                   |
| ------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- |
| [createLeakDetector](https://evolu.dev/docs/api-reference/common/LeakDetector/functions/createLeakDetector)         | Creates [LeakDetector](https://evolu.dev/docs/api-reference/common/LeakDetector/interfaces/LeakDetector) backed by `FinalizationRegistry`. |
| [testCreateLeakDetector](https://evolu.dev/docs/api-reference/common/LeakDetector/functions/testCreateLeakDetector) | Creates [TestLeakDetector](https://evolu.dev/docs/api-reference/common/LeakDetector/interfaces/TestLeakDetector).                          |

## Interfaces

| Interface                                                                                         | Description                                                                                                                     |
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| [Leak](https://evolu.dev/docs/api-reference/common/LeakDetector/interfaces/Leak)                               | Describes a tracked handle for [LeakDetector.track](https://evolu.dev/docs/api-reference/common/LeakDetector/interfaces/LeakDetector#track). |
| [LeakDetector](https://evolu.dev/docs/api-reference/common/LeakDetector/interfaces/LeakDetector)               | Detects handles that are garbage-collected while still considered held.                                                         |
| [LeakDetectorDep](https://evolu.dev/docs/api-reference/common/LeakDetector/interfaces/LeakDetectorDep)         | Dependency wrapper for [LeakDetector](https://evolu.dev/docs/api-reference/common/LeakDetector/interfaces/LeakDetector).                     |
| [TestLeakDetector](https://evolu.dev/docs/api-reference/common/LeakDetector/interfaces/TestLeakDetector)       | Test [LeakDetector](https://evolu.dev/docs/api-reference/common/LeakDetector/interfaces/LeakDetector) with deterministic collection.         |
| [TestLeakDetectorDep](https://evolu.dev/docs/api-reference/common/LeakDetector/interfaces/TestLeakDetectorDep) | Dependency wrapper for [TestLeakDetector](https://evolu.dev/docs/api-reference/common/LeakDetector/interfaces/TestLeakDetector).             |

## Variables

| Variable                                                                                   | Description                                                                                               |
| ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------- |
| [noopLeakDetector](https://evolu.dev/docs/api-reference/common/LeakDetector/variables/noopLeakDetector) | No-op [LeakDetector](https://evolu.dev/docs/api-reference/common/LeakDetector/interfaces/LeakDetector) for production. |