you-apps / RecordYou

Privacy focused recorder app built with MD3
https://you-apps.net
GNU General Public License v3.0
750 stars 34 forks source link

Fix Exoplayer Memory Leak #76

Closed SuhasDissa closed 1 year ago

SuhasDissa commented 1 year ago

Fixed a bug that caused created multiple ExoPlayer instances during each Screen composition. (Cause the phone to freeze if I keep the video view open for too long)

Its quite hard to see the problem. Problem becomes more noticeable when using exoPlayer.play() which plays the video in background but doesn't update the UI. (obviously because it affects a separate invisible instance of the player) and also exoPlayer.stop() doesn't actually stop the playing video.

Bnyro commented 1 year ago

Thank you! <3

SuhasDissa commented 1 year ago

Sorry for the previous bad PR. I was debugging the issue the whole day and my repo clone was not in a good state for a commit. So i just edited the code with GitHub web UI And forgot to add the import statement.

Pardon the inconvenience caused.

Bnyro commented 1 year ago

No worries :)