---
name: "offMemoryWarning"
mode: "kit"
versionRequirements:
  - { name: "BaseKit", version: "2.3.2" }
platform:
  - "iOS"
  - "Android"
async: true
---

## offMemoryWarning

> [VERSION] BaseKit >= 2.3.2

> [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 | - | Event listener callback function |

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

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


### Examples

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