Calling destroy() on the callObject has no effect

Options

Hi,

calling destroy() on the callObject seems to have no effect:

if (callObject) await callObject.destroy();

if (callObject) console.error("callObject still exists -.-")

The behaviour does not change, if I chain the promise with .then().


Versions:

"@daily-co/daily-js": "^0.44.1",

"@daily-co/daily-react": "^0.7.3",


Thanks

Comments

  • Lazer
    Lazer Dailynista
    Options

    Hi, @Daniel808 - thanks for reporting this! I believe it is expected behavior. destroy() frees up resources that the call object itself had to allocate within daily-js. It does not manipulate any variables declared in your own application code. You can use the isDestroyed() call object instance method to detect when the call object has been destroyed (it will return true if so).

  • Daniel808
    Options

    Thank you for the hint, i will give it a try.