[**RongIMLib**](../README.md) *** [RongIMLib](../globals.md) / destroy # Function: destroy() > **destroy**(): `Promise`\<`void`\> 反初始化 ## Returns `Promise`\<`void`\> ## Description 反初始化,清空所有监听及计时器,停止日志上报等业务 **适用场景**: 1. 应用退出时,推荐使用此方法 2. 需要更换 appkey 时,需要调用此方法后,重新使用新 Appkey 在次调用 [init](init.md) 方法 ## Example 反初始化示例: ```ts await RongIMLib.destroy(); console.log('反初始化完成'); ```