Skip to content

Commit 216d0fe

Browse files
committed
update destory process
1 parent 9481421 commit 216d0fe

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

libwebview/src/main/java/com/tlab/libwebview/UnityConnect.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,9 @@ public void onReceive(Context context, Intent intent) {
718718
*
719719
*/
720720
public void Destroy() {
721+
722+
releaseSharedTexture();
723+
721724
final Activity a = UnityPlayer.currentActivity;
722725
a.runOnUiThread(() -> {
723726
if (mWebView == null) {
@@ -729,11 +732,6 @@ public void Destroy() {
729732
mWebView.destroy();
730733
mWebView = null;
731734

732-
if(mSharedTexture != null){
733-
mSharedTexture.release();
734-
mSharedTexture = null;
735-
}
736-
737735
UnityPlayer.currentActivity.unregisterReceiver(
738736
mOnDownloadComplete);
739737
});

0 commit comments

Comments
 (0)