destroy method
Destroys the RtcEngine instance and releases all resources used by the Anyrtc SDK.
This method is useful for apps that occasionally make voice or video calls, to free up resources for other operations when not making calls.
Note
- Call this method in the subthread.
- Once the app calls RtcEngine.destroy to destroy the created RtcEngine instance, you cannot use any method or callback in the SDK.
Implementation
@override
Future<void> destroy() {
RtcChannel.destroyAll();
_handler = null;
_engine = null;
return _invokeMethod('destroy');
}