offMemoryWarning(listener: Function)

Requires:
BaseKit≥2.3.2@ray-js/ray≥0.3.23
Platforms:
iOSAndroid
import { offMemoryWarning } from '@ray-js/ray';

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

Description

Stop listening for low-memory warning events.

Parameters

ParameterTypeRequiredDescription
Yes

Return Value

None

Examples

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);