[Android/Error] Activity has leaked window DecorView that was originally added here ์˜ค๋ฅ˜

SoyoungLeeยท2022๋…„ 10์›” 24์ผ
0
post-thumbnail

[Android/Error] Activity has leaked window DecorView that was originally added here ์˜ค๋ฅ˜

๐Ÿ“Œ ์ด์Šˆ

Dialog๋ฅผ ๋„์šด ํ›„ ์•กํ‹ฐ๋น„ํ‹ฐ๋ฅผ ๋‹ซ์ง€์•Š๊ณ  ๋‹ซ์œผ๋ฉด ์ด๋Ÿฐ ์˜ค๋ฅ˜๊ฐ€ ์ƒ๊ธด๋‹ค

E/WindowManager: android.view.WindowLeaked: Activity has leaked window DecorView that was originally added here

๐Ÿ’œ ํ•ด๊ฒฐ ๋ฐฉ์•ˆ

๋‹ค์ด์–ผ๋กœ๊ทธ๋ฅผ ๋„์šด ์•กํ‹ฐ๋น„ํ‹ฐ์˜ onDestroy() ์—์„œ ๋‹ซ์•„์ค€๋‹ค.

override fun onDestroy() {
        super.onDestroy()
        //๋‹ค์ด์–ผ๋กœ๊ทธ๊ฐ€ ๋„์›Œ์ ธ ์žˆ๋Š” ์ƒํƒœ(showing)์ธ ๊ฒฝ์šฐ dismiss() ํ˜ธ์ถœ
        if (popup != null && popup!!.isShowing) {
            popup!!.dismiss()
        }
    }

์ฐธ๊ณ  : https://m.blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=monkeychoi&logNo=220363197385
https://jhdroid.tistory.com/12

profile
Android Developer..+ iOS ์Šฌ์ฉ ๐ŸŒฑ โœ๏ธ๋„์ ๋„์ ,,๊ฐœ์ธ ๊ธฐ๋ก์šฉ ๐Ÿ‘ฉ๐Ÿปโ€๐Ÿ’ป

0๊ฐœ์˜ ๋Œ“๊ธ€