offMemoryWarning(listener: Function)

版本要求:
BaseKit≥2.3.2@ray-js/ray≥0.3.23
支持平台:
iOSAndroid
import { offMemoryWarning } from '@ray-js/ray';

// Promise 调用
try {
  const res = await offMemoryWarning({ ...params });
  console.log(res);
} catch (err) {
  console.log(err.errorMsg);
}

描述

取消监听内存不足告警事件。

参数

参数类型必填说明
是

返回值

无

示例代码

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

// 取消监听内存告警:需先注册 listener,再传入同一个 listener 精确取消
const listener = e => console.log(e);
onMemoryWarning(listener);
offMemoryWarning(listener);