Skip to content

Commit

Permalink
ARTSurfaceViewShadowNode: Properly release mSurface
Browse files Browse the repository at this point in the history
Since onSurfaceTextureDestroyed() returns true, the SurfaceTexture object will be released
by the Android automatically so there's no need to call release on it. However,
the node should release its refereces to the Surface object.
  • Loading branch information
cabelitos committed Dec 18, 2018
1 parent d8fcb7f commit 793669f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int hei

@Override
public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) {
surface.release();
mSurface.release();
mSurface = null;
return true;
}
Expand Down

0 comments on commit 793669f

Please sign in to comment.