---
name: "offMemoryWarning"
mode: "kit"
versionRequirements:
  - { name: "BaseKit", version: "2.3.2" }
  - { name: "@ray-js/ray", version: "0.3.23" }
platform:
  - "iOS"
  - "Android"
async: true
---

## offMemoryWarning

> [VERSION] BaseKit >= 2.3.2 | @ray-js/ray >= 0.3.23

> [PLATFORM] iOS, Android

> ⚡ **Supports Promise** — Returns a Promise when success / fail / complete callbacks are omitted.

### Method signature

```typescript
offMemoryWarning(listener: Function)
```

### Description

Stop listening for low-memory warning events.

### Parameters

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `listener` | `(params: Object) => void` | Yes | - |  |

##### offMemoryWarning.listener(params) properties

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `level` | `number` | Yes | - | Memory warning level, Android only; corresponds to system macro definitions |


### Examples

```tsx
import { onMemoryWarning, offMemoryWarning } from '@ray-js/ray'

// Cancel memory warning listener: register a listener first, then pass the same listener to cancel precisely
const listener = e => console.log(e);
onMemoryWarning(listener);
offMemoryWarning(listener);
```
