Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release() the Surface? #31

Open
commonsguy opened this issue Mar 17, 2016 · 1 comment
Open

release() the Surface? #31

commonsguy opened this issue Mar 17, 2016 · 1 comment
Assignees

Comments

@commonsguy
Copy link

I am seeing StrictMode complaints coming from FensterVideoView, in version 0.0.2 of your library:

E/StrictMode: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
              java.lang.Throwable: Explicit termination method 'release' not called
                  at dalvik.system.CloseGuard.open(CloseGuard.java:180)
                  at android.view.Surface.setNativeObjectLocked(Surface.java:459)
                  at android.view.Surface.<init>(Surface.java:145)
                  at com.malmstein.fenster.view.FensterVideoView.openVideo(FensterVideoView.java:260)
                  at com.malmstein.fenster.view.FensterVideoView.access$2100(FensterVideoView.java:50)
                  at com.malmstein.fenster.view.FensterVideoView$8.onSurfaceTextureAvailable(FensterVideoView.java:553)

This appears to be coming from mMediaPlayer.setSurface(new Surface(mSurfaceTexture)). I do not see where you are releasing that Surface.

Thanks!

@malmstein
Copy link
Owner

Thanks for opening this @commonsguy, I'll take a look asap!

@malmstein malmstein self-assigned this Mar 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants