destroyPlayer

open fun destroyPlayer()

Destroys the current player and releases it from memory. This seems wasteful, but helps to mitigate working with the complex state machines that are the MediaPlayer and the SurfaceView

See also

android.media.MediaPlayer
android.view.SurfaceView