destroyCanvasView method
- int viewID
Destroy a canvas view.
When you no longer need to use a canvas view, you need to call this function to destroy it to release resources, otherwise it will cause memory leaks.
If it returns false, it's probably because the canvas view (in native or web side) to be destroyed doesn't exist or the ZegoExpressEngine instance is not created.
The viewID
is the id of the corresponding canvas view,
which can be obtained from the onViewCreated
callback of
the createCanvasView function.
Implementation
Future<bool> destroyCanvasView(int viewID) async {
return await ZegoExpressCanvasViewImpl.destroyCanvasView(viewID);
}