Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[BGF] fix a memory leak in FUChatActivity due to anonymous inner class.#57

Merged
yoreland merged 1 commit into
AgoraIO:master from
oOJohn6Oo:liuqiang
Aug 30, 2021
Merged

[BGF] fix a memory leak in FUChatActivity due to anonymous inner class. #57
yoreland merged 1 commit into
AgoraIO:master from
oOJohn6Oo:liuqiang

Conversation

@oOJohn6Oo

@oOJohn6Oo oOJohn6Oo commented Aug 30, 2021

Copy link
Copy Markdown
Contributor

mVideoManager.setCameraStateListener() and mFURenderer.setOnTrackStatusChangedListener() cause the problem.
Anonymous inner class will keep a reference to its outer class.
Basically we have two options to avoid memory leak:

  1. removing listeners when exit.
  2. Using weak references.

A better solution is to clear all listeners on the related SDK level in appropriate lifecycle.

@yoreland yoreland merged commit 99bda57 into AgoraIO:master Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@yoreland yoreland yoreland approved these changes

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /