# checkMemoryLeaks

**Kind:** Function

**Source:** [`atloria-monorepo/apps/web-e2e/src/utils/performance.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/apps/web-e2e/src/utils/performance.ts#L253)

Check for memory leaks by monitoring heap size

## Signature

```ts
async function checkMemoryLeaks(page: Page, action: () => Promise<void>, iterations): Promise<{
  hasLeak: boolean;
  heapGrowth: number;
  initialHeap: number;
  finalHeap: number;
}>
```

## Parameters

| Name | Type |
|---|---|
| `page` | `Page` |
| `action` | `() => Promise<void>` |
| `iterations` | `any` |

**Returns:** `Promise<{
  hasLeak: boolean;
  heapGrowth: number;
  initialHeap: number;
  finalHeap: number;
}>`
