Add comment before resetting variables in Angular tutorial

This commit is contained in:
juancarmore 2024-05-29 16:09:25 +02:00
parent e040890661
commit 46897e3ad7

View File

@ -111,6 +111,8 @@ export class AppComponent implements OnDestroy {
async leaveRoom() {
// Leave the room by calling 'disconnect' method over the Room object
await this.room?.disconnect();
// Reset all variables
delete this.room;
delete this.localTrack;
this.remoteTracksMap.clear();