Welcome to the new Daily Docs. Please let us know what you think.

destroy()

destroy()

You can re-use the call object multiple times (a sequence of join(), leave(), join(), etc method calls will work fine).

But when you are finished with the daily-js call object, you should call destroy() to free all resources associated with it.

This is particularly important if you plan to create another daily-js object in the future. If you don't call destroy(), and later create a new daily-js call object, the event listeners from the old object and the new object will interfere with one another.