Skip to content

Commit

Permalink
Merge pull request #15 from shiguredo/feature/fix-memory-leak
Browse files Browse the repository at this point in the history
config を循環参照しないように修正する
  • Loading branch information
miosakuma authored Nov 22, 2021
2 parents cb5f7ed + de89478 commit fad3c8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion SoraQuickStart/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,12 @@ class ViewController: UIViewController {

// ストリームが追加されたら受信用の VideoView をストリームにセットします。
// このアプリでは、複数のユーザーが接続した場合は最後のユーザーの映像のみ描画します。
let publisherStreamId = config.publisherStreamId
config.mediaChannelHandlers.onAddStream = { [weak self] stream in
guard let strongSelf = self else {
return
}
if stream.streamId != config.publisherStreamId {
if stream.streamId != publisherStreamId {
stream.videoRenderer = strongSelf.receiverVideoView
}
}
Expand Down

0 comments on commit fad3c8a

Please sign in to comment.